From a1760f0eea8077bd58719242c4bfdacacbe43517 Mon Sep 17 00:00:00 2001 From: Kubernetes Publisher Date: Mon, 9 Sep 2024 20:16:04 +0000 Subject: [PATCH] Automated openapi generation from release-1.30 Signed-off-by: Kubernetes Publisher --- kubernetes/.github/workflows/maven.yml | 6 +- kubernetes/.openapi-generator/COMMIT | 4 +- kubernetes/.openapi-generator/VERSION | 2 +- .../swagger.json-default.sha256 | 2 +- kubernetes/api/openapi.yaml | 4120 +++++++++++++---- kubernetes/docs/V1ConfigMapEnvSource.md | 2 +- kubernetes/docs/V1ConfigMapKeySelector.md | 2 +- kubernetes/docs/V1ConfigMapProjection.md | 2 +- kubernetes/docs/V1ConfigMapVolumeSource.md | 2 +- kubernetes/docs/V1HostAlias.md | 2 +- kubernetes/docs/V1HostIP.md | 2 +- kubernetes/docs/V1LocalObjectReference.md | 2 +- kubernetes/docs/V1PodIP.md | 2 +- kubernetes/docs/V1SecretEnvSource.md | 2 +- kubernetes/docs/V1SecretKeySelector.md | 2 +- kubernetes/docs/V1SecretProjection.md | 2 +- kubernetes/docs/V1ServiceSpec.md | 2 +- .../V1ValidatingAdmissionPolicyBindingList.md | 2 +- .../docs/V1ValidatingAdmissionPolicyList.md | 2 +- ...ha1ValidatingAdmissionPolicyBindingList.md | 2 +- .../V1alpha1ValidatingAdmissionPolicyList.md | 2 +- ...ta1ValidatingAdmissionPolicyBindingList.md | 2 +- .../V1beta1ValidatingAdmissionPolicyList.md | 2 +- .../client/openapi/ApiCallback.java | 23 +- .../kubernetes/client/openapi/ApiClient.java | 50 +- .../client/openapi/ApiException.java | 28 +- .../client/openapi/ApiResponse.java | 25 +- .../client/openapi/Configuration.java | 25 +- .../openapi/GzipRequestInterceptor.java | 23 +- .../io/kubernetes/client/openapi/JSON.java | 74 +- .../io/kubernetes/client/openapi/Pair.java | 25 +- .../client/openapi/ProgressRequestBody.java | 23 +- .../client/openapi/ProgressResponseBody.java | 23 +- .../client/openapi/ServerConfiguration.java | 13 +- .../client/openapi/ServerVariable.java | 13 +- .../kubernetes/client/openapi/StringUtil.java | 25 +- .../apis/AdmissionregistrationApi.java | 26 +- .../apis/AdmissionregistrationV1Api.java | 88 +- .../AdmissionregistrationV1alpha1Api.java | 60 +- .../apis/AdmissionregistrationV1beta1Api.java | 60 +- .../client/openapi/apis/ApiextensionsApi.java | 26 +- .../openapi/apis/ApiextensionsV1Api.java | 46 +- .../openapi/apis/ApiregistrationApi.java | 26 +- .../openapi/apis/ApiregistrationV1Api.java | 46 +- .../client/openapi/apis/ApisApi.java | 26 +- .../client/openapi/apis/AppsApi.java | 26 +- .../client/openapi/apis/AppsV1Api.java | 148 +- .../openapi/apis/AuthenticationApi.java | 26 +- .../openapi/apis/AuthenticationV1Api.java | 30 +- .../apis/AuthenticationV1alpha1Api.java | 28 +- .../apis/AuthenticationV1beta1Api.java | 28 +- .../client/openapi/apis/AuthorizationApi.java | 26 +- .../openapi/apis/AuthorizationV1Api.java | 34 +- .../client/openapi/apis/AutoscalingApi.java | 26 +- .../client/openapi/apis/AutoscalingV1Api.java | 48 +- .../client/openapi/apis/AutoscalingV2Api.java | 48 +- .../client/openapi/apis/BatchApi.java | 26 +- .../client/openapi/apis/BatchV1Api.java | 70 +- .../client/openapi/apis/CertificatesApi.java | 26 +- .../openapi/apis/CertificatesV1Api.java | 52 +- .../openapi/apis/CertificatesV1alpha1Api.java | 40 +- .../client/openapi/apis/CoordinationApi.java | 26 +- .../openapi/apis/CoordinationV1Api.java | 42 +- .../client/openapi/apis/CoreApi.java | 26 +- .../client/openapi/apis/CoreV1Api.java | 430 +- .../client/openapi/apis/CustomObjectsApi.java | 78 +- .../client/openapi/apis/DiscoveryApi.java | 26 +- .../client/openapi/apis/DiscoveryV1Api.java | 42 +- .../client/openapi/apis/EventsApi.java | 26 +- .../client/openapi/apis/EventsV1Api.java | 42 +- .../openapi/apis/FlowcontrolApiserverApi.java | 26 +- .../apis/FlowcontrolApiserverV1Api.java | 66 +- .../apis/FlowcontrolApiserverV1beta3Api.java | 66 +- .../openapi/apis/InternalApiserverApi.java | 26 +- .../apis/InternalApiserverV1alpha1Api.java | 46 +- .../client/openapi/apis/LogsApi.java | 32 +- .../client/openapi/apis/NetworkingApi.java | 26 +- .../client/openapi/apis/NetworkingV1Api.java | 78 +- .../openapi/apis/NetworkingV1alpha1Api.java | 60 +- .../client/openapi/apis/NodeApi.java | 26 +- .../client/openapi/apis/NodeV1Api.java | 40 +- .../client/openapi/apis/OpenidApi.java | 26 +- .../client/openapi/apis/PolicyApi.java | 26 +- .../client/openapi/apis/PolicyV1Api.java | 48 +- .../openapi/apis/RbacAuthorizationApi.java | 26 +- .../openapi/apis/RbacAuthorizationV1Api.java | 86 +- .../client/openapi/apis/ResourceApi.java | 26 +- .../openapi/apis/ResourceV1alpha2Api.java | 146 +- .../client/openapi/apis/SchedulingApi.java | 26 +- .../client/openapi/apis/SchedulingV1Api.java | 40 +- .../client/openapi/apis/StorageApi.java | 26 +- .../client/openapi/apis/StorageV1Api.java | 104 +- .../openapi/apis/StorageV1alpha1Api.java | 40 +- .../openapi/apis/StoragemigrationApi.java | 26 +- .../apis/StoragemigrationV1alpha1Api.java | 46 +- .../client/openapi/apis/VersionApi.java | 26 +- .../client/openapi/apis/WellKnownApi.java | 26 +- .../client/openapi/auth/ApiKeyAuth.java | 25 +- .../client/openapi/auth/Authentication.java | 23 +- .../client/openapi/auth/HttpBasicAuth.java | 23 +- .../client/openapi/auth/HttpBearerAuth.java | 45 +- .../openapi/models/AbstractOpenApiSchema.java | 30 +- ...missionregistrationV1ServiceReference.java | 66 +- ...sionregistrationV1WebhookClientConfig.java | 62 +- .../ApiextensionsV1ServiceReference.java | 66 +- .../ApiextensionsV1WebhookClientConfig.java | 62 +- .../ApiregistrationV1ServiceReference.java | 60 +- .../models/AuthenticationV1TokenRequest.java | 74 +- .../openapi/models/CoreV1EndpointPort.java | 66 +- .../client/openapi/models/CoreV1Event.java | 102 +- .../openapi/models/CoreV1EventList.java | 70 +- .../openapi/models/CoreV1EventSeries.java | 58 +- .../models/DiscoveryV1EndpointPort.java | 62 +- .../client/openapi/models/EventsV1Event.java | 102 +- .../openapi/models/EventsV1EventList.java | 70 +- .../openapi/models/EventsV1EventSeries.java | 62 +- .../openapi/models/FlowcontrolV1Subject.java | 72 +- .../client/openapi/models/RbacV1Subject.java | 66 +- .../openapi/models/StorageV1TokenRequest.java | 62 +- .../client/openapi/models/V1APIGroup.java | 78 +- .../client/openapi/models/V1APIGroupList.java | 66 +- .../client/openapi/models/V1APIResource.java | 86 +- .../openapi/models/V1APIResourceList.java | 68 +- .../client/openapi/models/V1APIService.java | 70 +- .../openapi/models/V1APIServiceCondition.java | 68 +- .../openapi/models/V1APIServiceList.java | 70 +- .../openapi/models/V1APIServiceSpec.java | 74 +- .../openapi/models/V1APIServiceStatus.java | 60 +- .../client/openapi/models/V1APIVersions.java | 68 +- .../V1AWSElasticBlockStoreVolumeSource.java | 66 +- .../client/openapi/models/V1Affinity.java | 66 +- .../openapi/models/V1AggregationRule.java | 60 +- .../openapi/models/V1AppArmorProfile.java | 62 +- .../openapi/models/V1AttachedVolume.java | 62 +- .../openapi/models/V1AuditAnnotation.java | 62 +- .../models/V1AzureDiskVolumeSource.java | 70 +- .../V1AzureFilePersistentVolumeSource.java | 66 +- .../models/V1AzureFileVolumeSource.java | 64 +- .../client/openapi/models/V1Binding.java | 70 +- .../models/V1BoundObjectReference.java | 62 +- .../client/openapi/models/V1CSIDriver.java | 70 +- .../openapi/models/V1CSIDriverList.java | 70 +- .../openapi/models/V1CSIDriverSpec.java | 78 +- .../client/openapi/models/V1CSINode.java | 70 +- .../openapi/models/V1CSINodeDriver.java | 72 +- .../client/openapi/models/V1CSINodeList.java | 70 +- .../client/openapi/models/V1CSINodeSpec.java | 62 +- .../models/V1CSIPersistentVolumeSource.java | 88 +- .../openapi/models/V1CSIStorageCapacity.java | 76 +- .../models/V1CSIStorageCapacityList.java | 70 +- .../openapi/models/V1CSIVolumeSource.java | 70 +- .../client/openapi/models/V1Capabilities.java | 66 +- .../V1CephFSPersistentVolumeSource.java | 72 +- .../openapi/models/V1CephFSVolumeSource.java | 72 +- .../models/V1CertificateSigningRequest.java | 74 +- .../V1CertificateSigningRequestCondition.java | 70 +- .../V1CertificateSigningRequestList.java | 70 +- .../V1CertificateSigningRequestSpec.java | 82 +- .../V1CertificateSigningRequestStatus.java | 62 +- .../V1CinderPersistentVolumeSource.java | 68 +- .../openapi/models/V1CinderVolumeSource.java | 68 +- .../client/openapi/models/V1ClaimSource.java | 58 +- .../openapi/models/V1ClientIPConfig.java | 56 +- .../client/openapi/models/V1ClusterRole.java | 72 +- .../openapi/models/V1ClusterRoleBinding.java | 76 +- .../models/V1ClusterRoleBindingList.java | 70 +- .../openapi/models/V1ClusterRoleList.java | 70 +- .../V1ClusterTrustBundleProjection.java | 70 +- .../openapi/models/V1ComponentCondition.java | 66 +- .../openapi/models/V1ComponentStatus.java | 68 +- .../openapi/models/V1ComponentStatusList.java | 70 +- .../client/openapi/models/V1Condition.java | 70 +- .../client/openapi/models/V1ConfigMap.java | 68 +- .../openapi/models/V1ConfigMapEnvSource.java | 60 +- .../models/V1ConfigMapKeySelector.java | 66 +- .../openapi/models/V1ConfigMapList.java | 70 +- .../models/V1ConfigMapNodeConfigSource.java | 68 +- .../openapi/models/V1ConfigMapProjection.java | 66 +- .../models/V1ConfigMapVolumeSource.java | 68 +- .../client/openapi/models/V1Container.java | 150 +- .../openapi/models/V1ContainerImage.java | 62 +- .../openapi/models/V1ContainerPort.java | 68 +- .../models/V1ContainerResizePolicy.java | 62 +- .../openapi/models/V1ContainerState.java | 66 +- .../models/V1ContainerStateRunning.java | 56 +- .../models/V1ContainerStateTerminated.java | 72 +- .../models/V1ContainerStateWaiting.java | 58 +- .../openapi/models/V1ContainerStatus.java | 92 +- .../openapi/models/V1ControllerRevision.java | 70 +- .../models/V1ControllerRevisionList.java | 70 +- .../client/openapi/models/V1CronJob.java | 70 +- .../client/openapi/models/V1CronJobList.java | 70 +- .../client/openapi/models/V1CronJobSpec.java | 76 +- .../openapi/models/V1CronJobStatus.java | 64 +- .../models/V1CrossVersionObjectReference.java | 64 +- .../V1CustomResourceColumnDefinition.java | 70 +- .../models/V1CustomResourceConversion.java | 64 +- .../models/V1CustomResourceDefinition.java | 74 +- .../V1CustomResourceDefinitionCondition.java | 68 +- .../V1CustomResourceDefinitionList.java | 70 +- .../V1CustomResourceDefinitionNames.java | 78 +- .../V1CustomResourceDefinitionSpec.java | 76 +- .../V1CustomResourceDefinitionStatus.java | 70 +- .../V1CustomResourceDefinitionVersion.java | 88 +- .../V1CustomResourceSubresourceScale.java | 64 +- .../models/V1CustomResourceSubresources.java | 60 +- .../models/V1CustomResourceValidation.java | 58 +- .../openapi/models/V1DaemonEndpoint.java | 60 +- .../client/openapi/models/V1DaemonSet.java | 70 +- .../openapi/models/V1DaemonSetCondition.java | 68 +- .../openapi/models/V1DaemonSetList.java | 70 +- .../openapi/models/V1DaemonSetSpec.java | 74 +- .../openapi/models/V1DaemonSetStatus.java | 82 +- .../models/V1DaemonSetUpdateStrategy.java | 60 +- .../openapi/models/V1DeleteOptions.java | 74 +- .../client/openapi/models/V1Deployment.java | 70 +- .../openapi/models/V1DeploymentCondition.java | 70 +- .../openapi/models/V1DeploymentList.java | 70 +- .../openapi/models/V1DeploymentSpec.java | 80 +- .../openapi/models/V1DeploymentStatus.java | 74 +- .../openapi/models/V1DeploymentStrategy.java | 60 +- .../models/V1DownwardAPIProjection.java | 60 +- .../models/V1DownwardAPIVolumeFile.java | 70 +- .../models/V1DownwardAPIVolumeSource.java | 62 +- .../models/V1EmptyDirVolumeSource.java | 58 +- .../client/openapi/models/V1Endpoint.java | 80 +- .../openapi/models/V1EndpointAddress.java | 68 +- .../openapi/models/V1EndpointConditions.java | 60 +- .../openapi/models/V1EndpointHints.java | 60 +- .../openapi/models/V1EndpointSlice.java | 78 +- .../openapi/models/V1EndpointSliceList.java | 70 +- .../openapi/models/V1EndpointSubset.java | 72 +- .../client/openapi/models/V1Endpoints.java | 68 +- .../openapi/models/V1EndpointsList.java | 70 +- .../openapi/models/V1EnvFromSource.java | 64 +- .../client/openapi/models/V1EnvVar.java | 66 +- .../client/openapi/models/V1EnvVarSource.java | 70 +- .../openapi/models/V1EphemeralContainer.java | 152 +- .../models/V1EphemeralVolumeSource.java | 58 +- .../client/openapi/models/V1EventSource.java | 58 +- .../client/openapi/models/V1Eviction.java | 66 +- .../client/openapi/models/V1ExecAction.java | 60 +- .../V1ExemptPriorityLevelConfiguration.java | 58 +- .../openapi/models/V1ExpressionWarning.java | 62 +- .../models/V1ExternalDocumentation.java | 58 +- .../openapi/models/V1FCVolumeSource.java | 72 +- .../models/V1FlexPersistentVolumeSource.java | 70 +- .../openapi/models/V1FlexVolumeSource.java | 70 +- .../openapi/models/V1FlockerVolumeSource.java | 58 +- .../models/V1FlowDistinguisherMethod.java | 60 +- .../client/openapi/models/V1FlowSchema.java | 70 +- .../openapi/models/V1FlowSchemaCondition.java | 64 +- .../openapi/models/V1FlowSchemaList.java | 70 +- .../openapi/models/V1FlowSchemaSpec.java | 74 +- .../openapi/models/V1FlowSchemaStatus.java | 60 +- .../client/openapi/models/V1ForZone.java | 60 +- .../V1GCEPersistentDiskVolumeSource.java | 66 +- .../client/openapi/models/V1GRPCAction.java | 62 +- .../openapi/models/V1GitRepoVolumeSource.java | 64 +- .../V1GlusterfsPersistentVolumeSource.java | 66 +- .../models/V1GlusterfsVolumeSource.java | 64 +- .../client/openapi/models/V1GroupSubject.java | 60 +- .../models/V1GroupVersionForDiscovery.java | 62 +- .../openapi/models/V1HTTPGetAction.java | 72 +- .../client/openapi/models/V1HTTPHeader.java | 62 +- .../openapi/models/V1HTTPIngressPath.java | 66 +- .../models/V1HTTPIngressRuleValue.java | 62 +- .../models/V1HorizontalPodAutoscaler.java | 70 +- .../models/V1HorizontalPodAutoscalerList.java | 70 +- .../models/V1HorizontalPodAutoscalerSpec.java | 68 +- .../V1HorizontalPodAutoscalerStatus.java | 68 +- .../client/openapi/models/V1HostAlias.java | 74 +- .../client/openapi/models/V1HostIP.java | 68 +- .../models/V1HostPathVolumeSource.java | 62 +- .../client/openapi/models/V1IPBlock.java | 66 +- .../models/V1ISCSIPersistentVolumeSource.java | 86 +- .../openapi/models/V1ISCSIVolumeSource.java | 86 +- .../client/openapi/models/V1Ingress.java | 70 +- .../openapi/models/V1IngressBackend.java | 62 +- .../client/openapi/models/V1IngressClass.java | 66 +- .../openapi/models/V1IngressClassList.java | 70 +- .../V1IngressClassParametersReference.java | 68 +- .../openapi/models/V1IngressClassSpec.java | 60 +- .../client/openapi/models/V1IngressList.java | 70 +- .../models/V1IngressLoadBalancerIngress.java | 64 +- .../models/V1IngressLoadBalancerStatus.java | 60 +- .../openapi/models/V1IngressPortStatus.java | 64 +- .../client/openapi/models/V1IngressRule.java | 60 +- .../models/V1IngressServiceBackend.java | 64 +- .../client/openapi/models/V1IngressSpec.java | 72 +- .../openapi/models/V1IngressStatus.java | 58 +- .../client/openapi/models/V1IngressTLS.java | 62 +- .../openapi/models/V1JSONSchemaProps.java | 174 +- .../client/openapi/models/V1Job.java | 70 +- .../client/openapi/models/V1JobCondition.java | 70 +- .../client/openapi/models/V1JobList.java | 70 +- .../client/openapi/models/V1JobSpec.java | 98 +- .../client/openapi/models/V1JobStatus.java | 82 +- .../openapi/models/V1JobTemplateSpec.java | 62 +- .../client/openapi/models/V1KeyToPath.java | 64 +- .../openapi/models/V1LabelSelector.java | 62 +- .../models/V1LabelSelectorRequirement.java | 68 +- .../client/openapi/models/V1Lease.java | 66 +- .../client/openapi/models/V1LeaseList.java | 70 +- .../client/openapi/models/V1LeaseSpec.java | 64 +- .../client/openapi/models/V1Lifecycle.java | 62 +- .../openapi/models/V1LifecycleHandler.java | 70 +- .../client/openapi/models/V1LimitRange.java | 66 +- .../openapi/models/V1LimitRangeItem.java | 70 +- .../openapi/models/V1LimitRangeList.java | 70 +- .../openapi/models/V1LimitRangeSpec.java | 62 +- .../openapi/models/V1LimitResponse.java | 64 +- .../V1LimitedPriorityLevelConfiguration.java | 64 +- .../client/openapi/models/V1ListMeta.java | 64 +- .../openapi/models/V1LoadBalancerIngress.java | 66 +- .../openapi/models/V1LoadBalancerStatus.java | 60 +- .../models/V1LocalObjectReference.java | 58 +- .../models/V1LocalSubjectAccessReview.java | 74 +- .../openapi/models/V1LocalVolumeSource.java | 62 +- .../openapi/models/V1ManagedFieldsEntry.java | 68 +- .../openapi/models/V1MatchCondition.java | 62 +- .../openapi/models/V1MatchResources.java | 76 +- .../openapi/models/V1ModifyVolumeStatus.java | 62 +- .../openapi/models/V1MutatingWebhook.java | 96 +- .../V1MutatingWebhookConfiguration.java | 68 +- .../V1MutatingWebhookConfigurationList.java | 70 +- .../openapi/models/V1NFSVolumeSource.java | 64 +- .../models/V1NamedRuleWithOperations.java | 86 +- .../client/openapi/models/V1Namespace.java | 70 +- .../openapi/models/V1NamespaceCondition.java | 68 +- .../openapi/models/V1NamespaceList.java | 70 +- .../openapi/models/V1NamespaceSpec.java | 60 +- .../openapi/models/V1NamespaceStatus.java | 62 +- .../openapi/models/V1NetworkPolicy.java | 66 +- .../models/V1NetworkPolicyEgressRule.java | 66 +- .../models/V1NetworkPolicyIngressRule.java | 66 +- .../openapi/models/V1NetworkPolicyList.java | 70 +- .../openapi/models/V1NetworkPolicyPeer.java | 66 +- .../openapi/models/V1NetworkPolicyPort.java | 60 +- .../openapi/models/V1NetworkPolicySpec.java | 80 +- .../client/openapi/models/V1Node.java | 70 +- .../client/openapi/models/V1NodeAddress.java | 62 +- .../client/openapi/models/V1NodeAffinity.java | 64 +- .../openapi/models/V1NodeCondition.java | 70 +- .../openapi/models/V1NodeConfigSource.java | 58 +- .../openapi/models/V1NodeConfigStatus.java | 68 +- .../openapi/models/V1NodeDaemonEndpoints.java | 58 +- .../client/openapi/models/V1NodeList.java | 70 +- .../openapi/models/V1NodeRuntimeHandler.java | 60 +- .../models/V1NodeRuntimeHandlerFeatures.java | 56 +- .../client/openapi/models/V1NodeSelector.java | 62 +- .../models/V1NodeSelectorRequirement.java | 68 +- .../openapi/models/V1NodeSelectorTerm.java | 66 +- .../client/openapi/models/V1NodeSpec.java | 78 +- .../client/openapi/models/V1NodeStatus.java | 108 +- .../openapi/models/V1NodeSystemInfo.java | 78 +- .../models/V1NonResourceAttributes.java | 58 +- .../models/V1NonResourcePolicyRule.java | 62 +- .../openapi/models/V1NonResourceRule.java | 66 +- .../openapi/models/V1ObjectFieldSelector.java | 62 +- .../client/openapi/models/V1ObjectMeta.java | 96 +- .../openapi/models/V1ObjectReference.java | 68 +- .../client/openapi/models/V1Overhead.java | 56 +- .../openapi/models/V1OwnerReference.java | 70 +- .../client/openapi/models/V1ParamKind.java | 58 +- .../client/openapi/models/V1ParamRef.java | 64 +- .../openapi/models/V1PersistentVolume.java | 70 +- .../models/V1PersistentVolumeClaim.java | 70 +- .../V1PersistentVolumeClaimCondition.java | 70 +- .../models/V1PersistentVolumeClaimList.java | 70 +- .../models/V1PersistentVolumeClaimSpec.java | 84 +- .../models/V1PersistentVolumeClaimStatus.java | 80 +- .../V1PersistentVolumeClaimTemplate.java | 66 +- .../V1PersistentVolumeClaimVolumeSource.java | 62 +- .../models/V1PersistentVolumeList.java | 70 +- .../models/V1PersistentVolumeSpec.java | 172 +- .../models/V1PersistentVolumeStatus.java | 62 +- .../V1PhotonPersistentDiskVolumeSource.java | 62 +- .../client/openapi/models/V1Pod.java | 70 +- .../client/openapi/models/V1PodAffinity.java | 66 +- .../openapi/models/V1PodAffinityTerm.java | 86 +- .../openapi/models/V1PodAntiAffinity.java | 66 +- .../client/openapi/models/V1PodCondition.java | 70 +- .../client/openapi/models/V1PodDNSConfig.java | 72 +- .../openapi/models/V1PodDNSConfigOption.java | 58 +- .../openapi/models/V1PodDisruptionBudget.java | 70 +- .../models/V1PodDisruptionBudgetList.java | 70 +- .../models/V1PodDisruptionBudgetSpec.java | 64 +- .../models/V1PodDisruptionBudgetStatus.java | 76 +- .../openapi/models/V1PodFailurePolicy.java | 62 +- ...odFailurePolicyOnExitCodesRequirement.java | 64 +- ...odFailurePolicyOnPodConditionsPattern.java | 62 +- .../models/V1PodFailurePolicyRule.java | 70 +- .../client/openapi/models/V1PodIP.java | 68 +- .../client/openapi/models/V1PodList.java | 70 +- .../client/openapi/models/V1PodOS.java | 60 +- .../openapi/models/V1PodReadinessGate.java | 60 +- .../openapi/models/V1PodResourceClaim.java | 64 +- .../models/V1PodResourceClaimStatus.java | 62 +- .../openapi/models/V1PodSchedulingGate.java | 60 +- .../openapi/models/V1PodSecurityContext.java | 92 +- .../client/openapi/models/V1PodSpec.java | 186 +- .../client/openapi/models/V1PodStatus.java | 114 +- .../client/openapi/models/V1PodTemplate.java | 66 +- .../openapi/models/V1PodTemplateList.java | 70 +- .../openapi/models/V1PodTemplateSpec.java | 62 +- .../client/openapi/models/V1PolicyRule.java | 84 +- .../models/V1PolicyRulesWithSubjects.java | 74 +- .../client/openapi/models/V1PortStatus.java | 64 +- .../models/V1PortworxVolumeSource.java | 64 +- .../openapi/models/V1Preconditions.java | 58 +- .../models/V1PreferredSchedulingTerm.java | 64 +- .../openapi/models/V1PriorityClass.java | 74 +- .../openapi/models/V1PriorityClassList.java | 70 +- .../models/V1PriorityLevelConfiguration.java | 70 +- ...V1PriorityLevelConfigurationCondition.java | 64 +- .../V1PriorityLevelConfigurationList.java | 70 +- ...V1PriorityLevelConfigurationReference.java | 60 +- .../V1PriorityLevelConfigurationSpec.java | 68 +- .../V1PriorityLevelConfigurationStatus.java | 60 +- .../client/openapi/models/V1Probe.java | 82 +- .../models/V1ProjectedVolumeSource.java | 62 +- .../models/V1QueuingConfiguration.java | 60 +- .../openapi/models/V1QuobyteVolumeSource.java | 70 +- .../models/V1RBDPersistentVolumeSource.java | 76 +- .../openapi/models/V1RBDVolumeSource.java | 76 +- .../client/openapi/models/V1ReplicaSet.java | 70 +- .../openapi/models/V1ReplicaSetCondition.java | 68 +- .../openapi/models/V1ReplicaSetList.java | 70 +- .../openapi/models/V1ReplicaSetSpec.java | 70 +- .../openapi/models/V1ReplicaSetStatus.java | 74 +- .../models/V1ReplicationController.java | 70 +- .../V1ReplicationControllerCondition.java | 68 +- .../models/V1ReplicationControllerList.java | 70 +- .../models/V1ReplicationControllerSpec.java | 64 +- .../models/V1ReplicationControllerStatus.java | 74 +- .../openapi/models/V1ResourceAttributes.java | 68 +- .../openapi/models/V1ResourceClaim.java | 60 +- .../models/V1ResourceFieldSelector.java | 64 +- .../openapi/models/V1ResourcePolicyRule.java | 72 +- .../openapi/models/V1ResourceQuota.java | 70 +- .../openapi/models/V1ResourceQuotaList.java | 70 +- .../openapi/models/V1ResourceQuotaSpec.java | 66 +- .../openapi/models/V1ResourceQuotaStatus.java | 58 +- .../models/V1ResourceRequirements.java | 64 +- .../client/openapi/models/V1ResourceRule.java | 78 +- .../client/openapi/models/V1Role.java | 68 +- .../client/openapi/models/V1RoleBinding.java | 76 +- .../openapi/models/V1RoleBindingList.java | 70 +- .../client/openapi/models/V1RoleList.java | 70 +- .../client/openapi/models/V1RoleRef.java | 64 +- .../models/V1RollingUpdateDaemonSet.java | 58 +- .../models/V1RollingUpdateDeployment.java | 58 +- .../V1RollingUpdateStatefulSetStrategy.java | 58 +- .../openapi/models/V1RuleWithOperations.java | 80 +- .../client/openapi/models/V1RuntimeClass.java | 76 +- .../openapi/models/V1RuntimeClassList.java | 70 +- .../openapi/models/V1SELinuxOptions.java | 62 +- .../client/openapi/models/V1Scale.java | 70 +- .../V1ScaleIOPersistentVolumeSource.java | 80 +- .../openapi/models/V1ScaleIOVolumeSource.java | 80 +- .../client/openapi/models/V1ScaleSpec.java | 56 +- .../client/openapi/models/V1ScaleStatus.java | 62 +- .../client/openapi/models/V1Scheduling.java | 62 +- .../openapi/models/V1ScopeSelector.java | 60 +- .../V1ScopedResourceSelectorRequirement.java | 68 +- .../openapi/models/V1SeccompProfile.java | 62 +- .../client/openapi/models/V1Secret.java | 73 +- .../openapi/models/V1SecretEnvSource.java | 60 +- .../openapi/models/V1SecretKeySelector.java | 66 +- .../client/openapi/models/V1SecretList.java | 70 +- .../openapi/models/V1SecretProjection.java | 66 +- .../openapi/models/V1SecretReference.java | 58 +- .../openapi/models/V1SecretVolumeSource.java | 66 +- .../openapi/models/V1SecurityContext.java | 88 +- .../openapi/models/V1SelectableField.java | 60 +- .../models/V1SelfSubjectAccessReview.java | 74 +- .../models/V1SelfSubjectAccessReviewSpec.java | 62 +- .../openapi/models/V1SelfSubjectReview.java | 66 +- .../models/V1SelfSubjectReviewStatus.java | 58 +- .../models/V1SelfSubjectRulesReview.java | 74 +- .../models/V1SelfSubjectRulesReviewSpec.java | 56 +- .../models/V1ServerAddressByClientCIDR.java | 62 +- .../client/openapi/models/V1Service.java | 70 +- .../openapi/models/V1ServiceAccount.java | 76 +- .../openapi/models/V1ServiceAccountList.java | 70 +- .../models/V1ServiceAccountSubject.java | 62 +- .../V1ServiceAccountTokenProjection.java | 64 +- .../openapi/models/V1ServiceBackendPort.java | 58 +- .../client/openapi/models/V1ServiceList.java | 70 +- .../client/openapi/models/V1ServicePort.java | 70 +- .../client/openapi/models/V1ServiceSpec.java | 118 +- .../openapi/models/V1ServiceStatus.java | 64 +- .../models/V1SessionAffinityConfig.java | 58 +- .../client/openapi/models/V1SleepAction.java | 60 +- .../client/openapi/models/V1StatefulSet.java | 70 +- .../models/V1StatefulSetCondition.java | 68 +- .../openapi/models/V1StatefulSetList.java | 70 +- .../openapi/models/V1StatefulSetOrdinals.java | 56 +- ...tPersistentVolumeClaimRetentionPolicy.java | 58 +- .../openapi/models/V1StatefulSetSpec.java | 94 +- .../openapi/models/V1StatefulSetStatus.java | 82 +- .../models/V1StatefulSetUpdateStrategy.java | 60 +- .../client/openapi/models/V1Status.java | 75 +- .../client/openapi/models/V1StatusCause.java | 60 +- .../openapi/models/V1StatusDetails.java | 70 +- .../client/openapi/models/V1StorageClass.java | 88 +- .../openapi/models/V1StorageClassList.java | 70 +- .../V1StorageOSPersistentVolumeSource.java | 66 +- .../models/V1StorageOSVolumeSource.java | 66 +- .../openapi/models/V1SubjectAccessReview.java | 74 +- .../models/V1SubjectAccessReviewSpec.java | 74 +- .../models/V1SubjectAccessReviewStatus.java | 66 +- .../models/V1SubjectRulesReviewStatus.java | 70 +- .../openapi/models/V1SuccessPolicy.java | 62 +- .../openapi/models/V1SuccessPolicyRule.java | 58 +- .../client/openapi/models/V1Sysctl.java | 62 +- .../openapi/models/V1TCPSocketAction.java | 62 +- .../client/openapi/models/V1Taint.java | 66 +- .../openapi/models/V1TokenRequestSpec.java | 66 +- .../openapi/models/V1TokenRequestStatus.java | 62 +- .../client/openapi/models/V1TokenReview.java | 74 +- .../openapi/models/V1TokenReviewSpec.java | 62 +- .../openapi/models/V1TokenReviewStatus.java | 68 +- .../client/openapi/models/V1Toleration.java | 64 +- .../V1TopologySelectorLabelRequirement.java | 62 +- .../models/V1TopologySelectorTerm.java | 60 +- .../models/V1TopologySpreadConstraint.java | 80 +- .../client/openapi/models/V1TypeChecking.java | 60 +- .../models/V1TypedLocalObjectReference.java | 64 +- .../models/V1TypedObjectReference.java | 66 +- .../models/V1UncountedTerminatedPods.java | 66 +- .../client/openapi/models/V1UserInfo.java | 66 +- .../client/openapi/models/V1UserSubject.java | 60 +- .../models/V1ValidatingAdmissionPolicy.java | 70 +- .../V1ValidatingAdmissionPolicyBinding.java | 66 +- ...1ValidatingAdmissionPolicyBindingList.java | 98 +- ...1ValidatingAdmissionPolicyBindingSpec.java | 70 +- .../V1ValidatingAdmissionPolicyList.java | 98 +- .../V1ValidatingAdmissionPolicySpec.java | 88 +- .../V1ValidatingAdmissionPolicyStatus.java | 66 +- .../openapi/models/V1ValidatingWebhook.java | 94 +- .../V1ValidatingWebhookConfiguration.java | 68 +- .../V1ValidatingWebhookConfigurationList.java | 70 +- .../client/openapi/models/V1Validation.java | 66 +- .../openapi/models/V1ValidationRule.java | 70 +- .../client/openapi/models/V1Variable.java | 62 +- .../client/openapi/models/V1Volume.java | 176 +- .../openapi/models/V1VolumeAttachment.java | 74 +- .../models/V1VolumeAttachmentList.java | 70 +- .../models/V1VolumeAttachmentSource.java | 60 +- .../models/V1VolumeAttachmentSpec.java | 66 +- .../models/V1VolumeAttachmentStatus.java | 70 +- .../client/openapi/models/V1VolumeDevice.java | 62 +- .../client/openapi/models/V1VolumeError.java | 58 +- .../client/openapi/models/V1VolumeMount.java | 72 +- .../openapi/models/V1VolumeMountStatus.java | 66 +- .../openapi/models/V1VolumeNodeAffinity.java | 58 +- .../openapi/models/V1VolumeNodeResources.java | 56 +- .../openapi/models/V1VolumeProjection.java | 74 +- .../models/V1VolumeResourceRequirements.java | 58 +- .../V1VsphereVirtualDiskVolumeSource.java | 66 +- .../client/openapi/models/V1WatchEvent.java | 62 +- .../openapi/models/V1WebhookConversion.java | 64 +- .../models/V1WeightedPodAffinityTerm.java | 64 +- .../V1WindowsSecurityContextOptions.java | 62 +- .../models/V1alpha1AuditAnnotation.java | 62 +- .../models/V1alpha1ClusterTrustBundle.java | 70 +- .../V1alpha1ClusterTrustBundleList.java | 70 +- .../V1alpha1ClusterTrustBundleSpec.java | 62 +- .../models/V1alpha1ExpressionWarning.java | 62 +- .../models/V1alpha1GroupVersionResource.java | 60 +- .../openapi/models/V1alpha1IPAddress.java | 66 +- .../openapi/models/V1alpha1IPAddressList.java | 70 +- .../openapi/models/V1alpha1IPAddressSpec.java | 62 +- .../models/V1alpha1MatchCondition.java | 62 +- .../models/V1alpha1MatchResources.java | 76 +- .../models/V1alpha1MigrationCondition.java | 68 +- .../V1alpha1NamedRuleWithOperations.java | 86 +- .../openapi/models/V1alpha1ParamKind.java | 58 +- .../openapi/models/V1alpha1ParamRef.java | 64 +- .../models/V1alpha1ParentReference.java | 66 +- .../models/V1alpha1SelfSubjectReview.java | 66 +- .../V1alpha1SelfSubjectReviewStatus.java | 58 +- .../models/V1alpha1ServerStorageVersion.java | 70 +- .../openapi/models/V1alpha1ServiceCIDR.java | 70 +- .../models/V1alpha1ServiceCIDRList.java | 70 +- .../models/V1alpha1ServiceCIDRSpec.java | 60 +- .../models/V1alpha1ServiceCIDRStatus.java | 60 +- .../models/V1alpha1StorageVersion.java | 72 +- .../V1alpha1StorageVersionCondition.java | 70 +- .../models/V1alpha1StorageVersionList.java | 70 +- .../V1alpha1StorageVersionMigration.java | 70 +- .../V1alpha1StorageVersionMigrationList.java | 70 +- .../V1alpha1StorageVersionMigrationSpec.java | 64 +- ...V1alpha1StorageVersionMigrationStatus.java | 62 +- .../models/V1alpha1StorageVersionStatus.java | 68 +- .../openapi/models/V1alpha1TypeChecking.java | 60 +- .../V1alpha1ValidatingAdmissionPolicy.java | 70 +- ...lpha1ValidatingAdmissionPolicyBinding.java | 66 +- ...1ValidatingAdmissionPolicyBindingList.java | 98 +- ...1ValidatingAdmissionPolicyBindingSpec.java | 70 +- ...V1alpha1ValidatingAdmissionPolicyList.java | 98 +- ...V1alpha1ValidatingAdmissionPolicySpec.java | 88 +- ...alpha1ValidatingAdmissionPolicyStatus.java | 66 +- .../openapi/models/V1alpha1Validation.java | 66 +- .../openapi/models/V1alpha1Variable.java | 62 +- .../models/V1alpha1VolumeAttributesClass.java | 70 +- .../V1alpha1VolumeAttributesClassList.java | 70 +- .../models/V1alpha2AllocationResult.java | 66 +- .../V1alpha2DriverAllocationResult.java | 60 +- .../models/V1alpha2DriverRequests.java | 64 +- ...1alpha2NamedResourcesAllocationResult.java | 60 +- .../V1alpha2NamedResourcesAttribute.java | 78 +- .../models/V1alpha2NamedResourcesFilter.java | 60 +- .../V1alpha2NamedResourcesInstance.java | 66 +- .../V1alpha2NamedResourcesIntSlice.java | 60 +- .../models/V1alpha2NamedResourcesRequest.java | 60 +- .../V1alpha2NamedResourcesResources.java | 62 +- .../V1alpha2NamedResourcesStringSlice.java | 60 +- .../models/V1alpha2PodSchedulingContext.java | 74 +- .../V1alpha2PodSchedulingContextList.java | 70 +- .../V1alpha2PodSchedulingContextSpec.java | 62 +- .../V1alpha2PodSchedulingContextStatus.java | 60 +- .../openapi/models/V1alpha2ResourceClaim.java | 74 +- ...1alpha2ResourceClaimConsumerReference.java | 66 +- .../models/V1alpha2ResourceClaimList.java | 70 +- .../V1alpha2ResourceClaimParameters.java | 74 +- .../V1alpha2ResourceClaimParametersList.java | 70 +- ...lpha2ResourceClaimParametersReference.java | 64 +- ...V1alpha2ResourceClaimSchedulingStatus.java | 62 +- .../models/V1alpha2ResourceClaimSpec.java | 66 +- .../models/V1alpha2ResourceClaimStatus.java | 68 +- .../models/V1alpha2ResourceClaimTemplate.java | 70 +- .../V1alpha2ResourceClaimTemplateList.java | 70 +- .../V1alpha2ResourceClaimTemplateSpec.java | 66 +- .../openapi/models/V1alpha2ResourceClass.java | 78 +- .../models/V1alpha2ResourceClassList.java | 70 +- .../V1alpha2ResourceClassParameters.java | 78 +- .../V1alpha2ResourceClassParametersList.java | 70 +- ...lpha2ResourceClassParametersReference.java | 66 +- .../models/V1alpha2ResourceFilter.java | 60 +- .../models/V1alpha2ResourceHandle.java | 62 +- .../models/V1alpha2ResourceRequest.java | 60 +- .../openapi/models/V1alpha2ResourceSlice.java | 74 +- .../models/V1alpha2ResourceSliceList.java | 70 +- .../V1alpha2StructuredResourceHandle.java | 68 +- .../models/V1alpha2VendorParameters.java | 58 +- .../models/V1beta1AuditAnnotation.java | 62 +- .../models/V1beta1ExpressionWarning.java | 62 +- .../openapi/models/V1beta1MatchCondition.java | 62 +- .../openapi/models/V1beta1MatchResources.java | 76 +- .../V1beta1NamedRuleWithOperations.java | 86 +- .../openapi/models/V1beta1ParamKind.java | 58 +- .../openapi/models/V1beta1ParamRef.java | 64 +- .../models/V1beta1SelfSubjectReview.java | 66 +- .../V1beta1SelfSubjectReviewStatus.java | 58 +- .../openapi/models/V1beta1TypeChecking.java | 60 +- .../V1beta1ValidatingAdmissionPolicy.java | 70 +- ...beta1ValidatingAdmissionPolicyBinding.java | 66 +- ...1ValidatingAdmissionPolicyBindingList.java | 98 +- ...1ValidatingAdmissionPolicyBindingSpec.java | 70 +- .../V1beta1ValidatingAdmissionPolicyList.java | 98 +- .../V1beta1ValidatingAdmissionPolicySpec.java | 88 +- ...1beta1ValidatingAdmissionPolicyStatus.java | 66 +- .../openapi/models/V1beta1Validation.java | 66 +- .../openapi/models/V1beta1Variable.java | 62 +- ...beta3ExemptPriorityLevelConfiguration.java | 58 +- .../V1beta3FlowDistinguisherMethod.java | 60 +- .../openapi/models/V1beta3FlowSchema.java | 70 +- .../models/V1beta3FlowSchemaCondition.java | 64 +- .../openapi/models/V1beta3FlowSchemaList.java | 70 +- .../openapi/models/V1beta3FlowSchemaSpec.java | 74 +- .../models/V1beta3FlowSchemaStatus.java | 60 +- .../openapi/models/V1beta3GroupSubject.java | 60 +- .../openapi/models/V1beta3LimitResponse.java | 64 +- ...eta3LimitedPriorityLevelConfiguration.java | 64 +- .../models/V1beta3NonResourcePolicyRule.java | 62 +- .../V1beta3PolicyRulesWithSubjects.java | 74 +- .../V1beta3PriorityLevelConfiguration.java | 70 +- ...a3PriorityLevelConfigurationCondition.java | 64 +- ...V1beta3PriorityLevelConfigurationList.java | 70 +- ...a3PriorityLevelConfigurationReference.java | 60 +- ...V1beta3PriorityLevelConfigurationSpec.java | 68 +- ...beta3PriorityLevelConfigurationStatus.java | 60 +- .../models/V1beta3QueuingConfiguration.java | 60 +- .../models/V1beta3ResourcePolicyRule.java | 72 +- .../models/V1beta3ServiceAccountSubject.java | 62 +- .../client/openapi/models/V1beta3Subject.java | 72 +- .../openapi/models/V1beta3UserSubject.java | 60 +- .../V2ContainerResourceMetricSource.java | 66 +- .../V2ContainerResourceMetricStatus.java | 66 +- .../models/V2CrossVersionObjectReference.java | 64 +- .../models/V2ExternalMetricSource.java | 66 +- .../models/V2ExternalMetricStatus.java | 66 +- .../openapi/models/V2HPAScalingPolicy.java | 64 +- .../openapi/models/V2HPAScalingRules.java | 64 +- .../models/V2HorizontalPodAutoscaler.java | 70 +- .../V2HorizontalPodAutoscalerBehavior.java | 62 +- .../V2HorizontalPodAutoscalerCondition.java | 68 +- .../models/V2HorizontalPodAutoscalerList.java | 70 +- .../models/V2HorizontalPodAutoscalerSpec.java | 76 +- .../V2HorizontalPodAutoscalerStatus.java | 78 +- .../openapi/models/V2MetricIdentifier.java | 64 +- .../client/openapi/models/V2MetricSpec.java | 80 +- .../client/openapi/models/V2MetricStatus.java | 80 +- .../client/openapi/models/V2MetricTarget.java | 66 +- .../openapi/models/V2MetricValueStatus.java | 60 +- .../openapi/models/V2ObjectMetricSource.java | 70 +- .../openapi/models/V2ObjectMetricStatus.java | 70 +- .../openapi/models/V2PodsMetricSource.java | 66 +- .../openapi/models/V2PodsMetricStatus.java | 66 +- .../models/V2ResourceMetricSource.java | 64 +- .../models/V2ResourceMetricStatus.java | 64 +- .../client/openapi/models/VersionInfo.java | 76 +- kubernetes/swagger.json | 45 +- 716 files changed, 24395 insertions(+), 25696 deletions(-) diff --git a/kubernetes/.github/workflows/maven.yml b/kubernetes/.github/workflows/maven.yml index e6fadf5668..2bdb7b6d47 100644 --- a/kubernetes/.github/workflows/maven.yml +++ b/kubernetes/.github/workflows/maven.yml @@ -17,11 +17,11 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - java: [ '8' ] + java: [ 17, 21 ] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up JDK - uses: actions/setup-java@v2 + uses: actions/setup-java@v4 with: java-version: ${{ matrix.java }} distribution: 'temurin' diff --git a/kubernetes/.openapi-generator/COMMIT b/kubernetes/.openapi-generator/COMMIT index e55d78f521..eaeb6a15ba 100644 --- a/kubernetes/.openapi-generator/COMMIT +++ b/kubernetes/.openapi-generator/COMMIT @@ -1,2 +1,2 @@ -Requested Commit/Tag : v6.6.0 -Actual Commit : 7f8b853f502d9039c9a0aac2614ce92871e895ed +Requested Commit/Tag : v7.6.0 +Actual Commit : ab7d0cb74f6ef95bdaeafd327bbdb5d54f819175 diff --git a/kubernetes/.openapi-generator/VERSION b/kubernetes/.openapi-generator/VERSION index cd802a1ec4..93c8ddab9f 100644 --- a/kubernetes/.openapi-generator/VERSION +++ b/kubernetes/.openapi-generator/VERSION @@ -1 +1 @@ -6.6.0 \ No newline at end of file +7.6.0 diff --git a/kubernetes/.openapi-generator/swagger.json-default.sha256 b/kubernetes/.openapi-generator/swagger.json-default.sha256 index cba24b73ed..7ec71b05f0 100644 --- a/kubernetes/.openapi-generator/swagger.json-default.sha256 +++ b/kubernetes/.openapi-generator/swagger.json-default.sha256 @@ -1 +1 @@ -d4cf964586286f87943c945f2bdce2e177ff733dc7431b40cc7c3c6982ee3c60 \ No newline at end of file +1c81e5babf0c4a980f711a4272c350d0b657df2666a570aca99c255314d67139 \ No newline at end of file diff --git a/kubernetes/api/openapi.yaml b/kubernetes/api/openapi.yaml index 01581cc577..84c5ce3c55 100644 --- a/kubernetes/api/openapi.yaml +++ b/kubernetes/api/openapi.yaml @@ -29,7 +29,10 @@ paths: description: Unauthorized tags: - core - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /api/v1/: get: description: get available resources @@ -52,7 +55,10 @@ paths: description: Unauthorized tags: - core_v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /api/v1/componentstatuses: get: description: list objects of kind ComponentStatus @@ -178,7 +184,12 @@ paths: group: "" kind: ComponentStatus version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml /api/v1/componentstatuses/{name}: get: description: read the specified ComponentStatus @@ -220,7 +231,10 @@ paths: group: "" kind: ComponentStatus version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /api/v1/configmaps: get: description: list or watch objects of kind ConfigMap @@ -346,7 +360,12 @@ paths: group: "" kind: ConfigMap version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml /api/v1/endpoints: get: description: list or watch objects of kind Endpoints @@ -472,7 +491,12 @@ paths: group: "" kind: Endpoints version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml /api/v1/events: get: description: list or watch objects of kind Event @@ -598,7 +622,12 @@ paths: group: "" kind: Event version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml /api/v1/limitranges: get: description: list or watch objects of kind LimitRange @@ -724,7 +753,12 @@ paths: group: "" kind: LimitRange version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml /api/v1/namespaces: get: description: list or watch objects of kind Namespace @@ -850,7 +884,12 @@ paths: group: "" kind: Namespace version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml post: description: create a Namespace operationId: createNamespace @@ -949,7 +988,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /api/v1/namespaces/{namespace}/bindings: post: description: create a Binding @@ -1055,7 +1097,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /api/v1/namespaces/{namespace}/configmaps: delete: description: delete collection of ConfigMap @@ -1209,7 +1254,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: list or watch objects of kind ConfigMap operationId: listNamespacedConfigMap @@ -1340,7 +1388,12 @@ paths: group: "" kind: ConfigMap version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml post: description: create a ConfigMap operationId: createNamespacedConfigMap @@ -1445,7 +1498,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /api/v1/namespaces/{namespace}/configmaps/{name}: delete: description: delete a ConfigMap @@ -1549,7 +1605,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: read the specified ConfigMap operationId: readNamespacedConfigMap @@ -1596,7 +1655,10 @@ paths: group: "" kind: ConfigMap version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update the specified ConfigMap operationId: patchNamespacedConfigMap @@ -1704,7 +1766,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace the specified ConfigMap operationId: replaceNamespacedConfigMap @@ -1803,7 +1868,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /api/v1/namespaces/{namespace}/endpoints: delete: description: delete collection of Endpoints @@ -1957,7 +2025,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: list or watch objects of kind Endpoints operationId: listNamespacedEndpoints @@ -2088,7 +2159,12 @@ paths: group: "" kind: Endpoints version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml post: description: create Endpoints operationId: createNamespacedEndpoints @@ -2193,7 +2269,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /api/v1/namespaces/{namespace}/endpoints/{name}: delete: description: delete Endpoints @@ -2297,7 +2376,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: read the specified Endpoints operationId: readNamespacedEndpoints @@ -2344,7 +2426,10 @@ paths: group: "" kind: Endpoints version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update the specified Endpoints operationId: patchNamespacedEndpoints @@ -2452,7 +2537,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace the specified Endpoints operationId: replaceNamespacedEndpoints @@ -2551,7 +2639,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /api/v1/namespaces/{namespace}/events: delete: description: delete collection of Event @@ -2705,7 +2796,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: list or watch objects of kind Event operationId: listNamespacedEvent @@ -2836,7 +2930,12 @@ paths: group: "" kind: Event version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml post: description: create an Event operationId: createNamespacedEvent @@ -2941,7 +3040,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /api/v1/namespaces/{namespace}/events/{name}: delete: description: delete an Event @@ -3045,7 +3147,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: read the specified Event operationId: readNamespacedEvent @@ -3092,7 +3197,10 @@ paths: group: "" kind: Event version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update the specified Event operationId: patchNamespacedEvent @@ -3200,7 +3308,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace the specified Event operationId: replaceNamespacedEvent @@ -3299,7 +3410,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /api/v1/namespaces/{namespace}/limitranges: delete: description: delete collection of LimitRange @@ -3453,7 +3567,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: list or watch objects of kind LimitRange operationId: listNamespacedLimitRange @@ -3584,7 +3701,12 @@ paths: group: "" kind: LimitRange version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml post: description: create a LimitRange operationId: createNamespacedLimitRange @@ -3689,7 +3811,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /api/v1/namespaces/{namespace}/limitranges/{name}: delete: description: delete a LimitRange @@ -3793,7 +3918,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: read the specified LimitRange operationId: readNamespacedLimitRange @@ -3840,7 +3968,10 @@ paths: group: "" kind: LimitRange version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update the specified LimitRange operationId: patchNamespacedLimitRange @@ -3948,7 +4079,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace the specified LimitRange operationId: replaceNamespacedLimitRange @@ -4047,7 +4181,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /api/v1/namespaces/{namespace}/persistentvolumeclaims: delete: description: delete collection of PersistentVolumeClaim @@ -4201,7 +4338,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: list or watch objects of kind PersistentVolumeClaim operationId: listNamespacedPersistentVolumeClaim @@ -4332,7 +4472,12 @@ paths: group: "" kind: PersistentVolumeClaim version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml post: description: create a PersistentVolumeClaim operationId: createNamespacedPersistentVolumeClaim @@ -4437,7 +4582,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}: delete: description: delete a PersistentVolumeClaim @@ -4541,7 +4689,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: read the specified PersistentVolumeClaim operationId: readNamespacedPersistentVolumeClaim @@ -4588,7 +4739,10 @@ paths: group: "" kind: PersistentVolumeClaim version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update the specified PersistentVolumeClaim operationId: patchNamespacedPersistentVolumeClaim @@ -4696,7 +4850,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace the specified PersistentVolumeClaim operationId: replaceNamespacedPersistentVolumeClaim @@ -4795,7 +4952,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}/status: get: description: read status of the specified PersistentVolumeClaim @@ -4843,7 +5003,10 @@ paths: group: "" kind: PersistentVolumeClaim version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update status of the specified PersistentVolumeClaim operationId: patchNamespacedPersistentVolumeClaimStatus @@ -4951,7 +5114,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace status of the specified PersistentVolumeClaim operationId: replaceNamespacedPersistentVolumeClaimStatus @@ -5050,7 +5216,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /api/v1/namespaces/{namespace}/pods: delete: description: delete collection of Pod @@ -5204,7 +5373,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: list or watch objects of kind Pod operationId: listNamespacedPod @@ -5335,7 +5507,12 @@ paths: group: "" kind: Pod version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml post: description: create a Pod operationId: createNamespacedPod @@ -5440,7 +5617,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /api/v1/namespaces/{namespace}/pods/{name}: delete: description: delete a Pod @@ -5544,7 +5724,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: read the specified Pod operationId: readNamespacedPod @@ -5591,7 +5774,10 @@ paths: group: "" kind: Pod version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update the specified Pod operationId: patchNamespacedPod @@ -5699,7 +5885,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace the specified Pod operationId: replaceNamespacedPod @@ -5798,7 +5987,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /api/v1/namespaces/{namespace}/pods/{name}/attach: get: description: connect GET requests to attach of Pod @@ -5864,7 +6056,8 @@ paths: group: "" kind: PodAttachOptions version: v1 - x-accepts: '*/*' + x-accepts: + - '*/*' post: description: connect POST requests to attach of Pod operationId: connectPostNamespacedPodAttach @@ -5929,7 +6122,8 @@ paths: group: "" kind: PodAttachOptions version: v1 - x-accepts: '*/*' + x-accepts: + - '*/*' /api/v1/namespaces/{namespace}/pods/{name}/binding: post: description: create binding of a Pod @@ -6041,7 +6235,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /api/v1/namespaces/{namespace}/pods/{name}/ephemeralcontainers: get: description: read ephemeralcontainers of the specified Pod @@ -6089,7 +6286,10 @@ paths: group: "" kind: Pod version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update ephemeralcontainers of the specified Pod operationId: patchNamespacedPodEphemeralcontainers @@ -6197,7 +6397,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace ephemeralcontainers of the specified Pod operationId: replaceNamespacedPodEphemeralcontainers @@ -6296,7 +6499,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /api/v1/namespaces/{namespace}/pods/{name}/eviction: post: description: create eviction of a Pod @@ -6408,7 +6614,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /api/v1/namespaces/{namespace}/pods/{name}/exec: get: description: connect GET requests to exec of Pod @@ -6477,7 +6686,8 @@ paths: group: "" kind: PodExecOptions version: v1 - x-accepts: '*/*' + x-accepts: + - '*/*' post: description: connect POST requests to exec of Pod operationId: connectPostNamespacedPodExec @@ -6545,7 +6755,8 @@ paths: group: "" kind: PodExecOptions version: v1 - x-accepts: '*/*' + x-accepts: + - '*/*' /api/v1/namespaces/{namespace}/pods/{name}/log: get: description: read log of the specified Pod @@ -6654,7 +6865,11 @@ paths: group: "" kind: Pod version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml + - text/plain /api/v1/namespaces/{namespace}/pods/{name}/portforward: get: description: connect GET requests to portforward of Pod @@ -6694,7 +6909,8 @@ paths: group: "" kind: PodPortForwardOptions version: v1 - x-accepts: '*/*' + x-accepts: + - '*/*' post: description: connect POST requests to portforward of Pod operationId: connectPostNamespacedPodPortforward @@ -6733,7 +6949,8 @@ paths: group: "" kind: PodPortForwardOptions version: v1 - x-accepts: '*/*' + x-accepts: + - '*/*' /api/v1/namespaces/{namespace}/pods/{name}/proxy: delete: description: connect DELETE requests to proxy of Pod @@ -6774,7 +6991,8 @@ paths: group: "" kind: PodProxyOptions version: v1 - x-accepts: '*/*' + x-accepts: + - '*/*' get: description: connect GET requests to proxy of Pod operationId: connectGetNamespacedPodProxy @@ -6814,7 +7032,8 @@ paths: group: "" kind: PodProxyOptions version: v1 - x-accepts: '*/*' + x-accepts: + - '*/*' head: description: connect HEAD requests to proxy of Pod operationId: connectHeadNamespacedPodProxy @@ -6854,7 +7073,8 @@ paths: group: "" kind: PodProxyOptions version: v1 - x-accepts: '*/*' + x-accepts: + - '*/*' options: description: connect OPTIONS requests to proxy of Pod operationId: connectOptionsNamespacedPodProxy @@ -6894,7 +7114,8 @@ paths: group: "" kind: PodProxyOptions version: v1 - x-accepts: '*/*' + x-accepts: + - '*/*' patch: description: connect PATCH requests to proxy of Pod operationId: connectPatchNamespacedPodProxy @@ -6934,7 +7155,8 @@ paths: group: "" kind: PodProxyOptions version: v1 - x-accepts: '*/*' + x-accepts: + - '*/*' post: description: connect POST requests to proxy of Pod operationId: connectPostNamespacedPodProxy @@ -6974,7 +7196,8 @@ paths: group: "" kind: PodProxyOptions version: v1 - x-accepts: '*/*' + x-accepts: + - '*/*' put: description: connect PUT requests to proxy of Pod operationId: connectPutNamespacedPodProxy @@ -7014,7 +7237,8 @@ paths: group: "" kind: PodProxyOptions version: v1 - x-accepts: '*/*' + x-accepts: + - '*/*' /api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}: delete: description: connect DELETE requests to proxy of Pod @@ -7061,7 +7285,8 @@ paths: group: "" kind: PodProxyOptions version: v1 - x-accepts: '*/*' + x-accepts: + - '*/*' get: description: connect GET requests to proxy of Pod operationId: connectGetNamespacedPodProxyWithPath @@ -7107,7 +7332,8 @@ paths: group: "" kind: PodProxyOptions version: v1 - x-accepts: '*/*' + x-accepts: + - '*/*' head: description: connect HEAD requests to proxy of Pod operationId: connectHeadNamespacedPodProxyWithPath @@ -7153,7 +7379,8 @@ paths: group: "" kind: PodProxyOptions version: v1 - x-accepts: '*/*' + x-accepts: + - '*/*' options: description: connect OPTIONS requests to proxy of Pod operationId: connectOptionsNamespacedPodProxyWithPath @@ -7199,7 +7426,8 @@ paths: group: "" kind: PodProxyOptions version: v1 - x-accepts: '*/*' + x-accepts: + - '*/*' patch: description: connect PATCH requests to proxy of Pod operationId: connectPatchNamespacedPodProxyWithPath @@ -7245,7 +7473,8 @@ paths: group: "" kind: PodProxyOptions version: v1 - x-accepts: '*/*' + x-accepts: + - '*/*' post: description: connect POST requests to proxy of Pod operationId: connectPostNamespacedPodProxyWithPath @@ -7291,7 +7520,8 @@ paths: group: "" kind: PodProxyOptions version: v1 - x-accepts: '*/*' + x-accepts: + - '*/*' put: description: connect PUT requests to proxy of Pod operationId: connectPutNamespacedPodProxyWithPath @@ -7337,7 +7567,8 @@ paths: group: "" kind: PodProxyOptions version: v1 - x-accepts: '*/*' + x-accepts: + - '*/*' /api/v1/namespaces/{namespace}/pods/{name}/status: get: description: read status of the specified Pod @@ -7385,7 +7616,10 @@ paths: group: "" kind: Pod version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update status of the specified Pod operationId: patchNamespacedPodStatus @@ -7493,7 +7727,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace status of the specified Pod operationId: replaceNamespacedPodStatus @@ -7592,7 +7829,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /api/v1/namespaces/{namespace}/podtemplates: delete: description: delete collection of PodTemplate @@ -7746,7 +7986,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: list or watch objects of kind PodTemplate operationId: listNamespacedPodTemplate @@ -7877,7 +8120,12 @@ paths: group: "" kind: PodTemplate version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml post: description: create a PodTemplate operationId: createNamespacedPodTemplate @@ -7982,7 +8230,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /api/v1/namespaces/{namespace}/podtemplates/{name}: delete: description: delete a PodTemplate @@ -8086,7 +8337,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: read the specified PodTemplate operationId: readNamespacedPodTemplate @@ -8133,7 +8387,10 @@ paths: group: "" kind: PodTemplate version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update the specified PodTemplate operationId: patchNamespacedPodTemplate @@ -8241,7 +8498,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace the specified PodTemplate operationId: replaceNamespacedPodTemplate @@ -8340,7 +8600,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /api/v1/namespaces/{namespace}/replicationcontrollers: delete: description: delete collection of ReplicationController @@ -8494,7 +8757,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: list or watch objects of kind ReplicationController operationId: listNamespacedReplicationController @@ -8625,7 +8891,12 @@ paths: group: "" kind: ReplicationController version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml post: description: create a ReplicationController operationId: createNamespacedReplicationController @@ -8730,7 +9001,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /api/v1/namespaces/{namespace}/replicationcontrollers/{name}: delete: description: delete a ReplicationController @@ -8834,7 +9108,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: read the specified ReplicationController operationId: readNamespacedReplicationController @@ -8881,7 +9158,10 @@ paths: group: "" kind: ReplicationController version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update the specified ReplicationController operationId: patchNamespacedReplicationController @@ -8989,7 +9269,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace the specified ReplicationController operationId: replaceNamespacedReplicationController @@ -9088,7 +9371,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /api/v1/namespaces/{namespace}/replicationcontrollers/{name}/scale: get: description: read scale of the specified ReplicationController @@ -9136,7 +9422,10 @@ paths: group: autoscaling kind: Scale version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update scale of the specified ReplicationController operationId: patchNamespacedReplicationControllerScale @@ -9244,7 +9533,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace scale of the specified ReplicationController operationId: replaceNamespacedReplicationControllerScale @@ -9343,7 +9635,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /api/v1/namespaces/{namespace}/replicationcontrollers/{name}/status: get: description: read status of the specified ReplicationController @@ -9391,7 +9686,10 @@ paths: group: "" kind: ReplicationController version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update status of the specified ReplicationController operationId: patchNamespacedReplicationControllerStatus @@ -9499,7 +9797,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace status of the specified ReplicationController operationId: replaceNamespacedReplicationControllerStatus @@ -9598,7 +9899,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /api/v1/namespaces/{namespace}/resourcequotas: delete: description: delete collection of ResourceQuota @@ -9752,7 +10056,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: list or watch objects of kind ResourceQuota operationId: listNamespacedResourceQuota @@ -9883,7 +10190,12 @@ paths: group: "" kind: ResourceQuota version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml post: description: create a ResourceQuota operationId: createNamespacedResourceQuota @@ -9988,7 +10300,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /api/v1/namespaces/{namespace}/resourcequotas/{name}: delete: description: delete a ResourceQuota @@ -10092,7 +10407,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: read the specified ResourceQuota operationId: readNamespacedResourceQuota @@ -10139,7 +10457,10 @@ paths: group: "" kind: ResourceQuota version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update the specified ResourceQuota operationId: patchNamespacedResourceQuota @@ -10247,7 +10568,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace the specified ResourceQuota operationId: replaceNamespacedResourceQuota @@ -10346,7 +10670,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /api/v1/namespaces/{namespace}/resourcequotas/{name}/status: get: description: read status of the specified ResourceQuota @@ -10394,7 +10721,10 @@ paths: group: "" kind: ResourceQuota version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update status of the specified ResourceQuota operationId: patchNamespacedResourceQuotaStatus @@ -10502,7 +10832,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace status of the specified ResourceQuota operationId: replaceNamespacedResourceQuotaStatus @@ -10601,7 +10934,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /api/v1/namespaces/{namespace}/secrets: delete: description: delete collection of Secret @@ -10755,7 +11091,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: list or watch objects of kind Secret operationId: listNamespacedSecret @@ -10886,7 +11225,12 @@ paths: group: "" kind: Secret version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml post: description: create a Secret operationId: createNamespacedSecret @@ -10991,7 +11335,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /api/v1/namespaces/{namespace}/secrets/{name}: delete: description: delete a Secret @@ -11095,7 +11442,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: read the specified Secret operationId: readNamespacedSecret @@ -11142,7 +11492,10 @@ paths: group: "" kind: Secret version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update the specified Secret operationId: patchNamespacedSecret @@ -11250,7 +11603,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace the specified Secret operationId: replaceNamespacedSecret @@ -11349,7 +11705,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /api/v1/namespaces/{namespace}/serviceaccounts: delete: description: delete collection of ServiceAccount @@ -11503,7 +11862,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: list or watch objects of kind ServiceAccount operationId: listNamespacedServiceAccount @@ -11634,7 +11996,12 @@ paths: group: "" kind: ServiceAccount version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml post: description: create a ServiceAccount operationId: createNamespacedServiceAccount @@ -11739,7 +12106,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /api/v1/namespaces/{namespace}/serviceaccounts/{name}: delete: description: delete a ServiceAccount @@ -11843,7 +12213,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: read the specified ServiceAccount operationId: readNamespacedServiceAccount @@ -11890,7 +12263,10 @@ paths: group: "" kind: ServiceAccount version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update the specified ServiceAccount operationId: patchNamespacedServiceAccount @@ -11998,7 +12374,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace the specified ServiceAccount operationId: replaceNamespacedServiceAccount @@ -12097,7 +12476,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /api/v1/namespaces/{namespace}/serviceaccounts/{name}/token: post: description: create token of a ServiceAccount @@ -12209,7 +12591,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /api/v1/namespaces/{namespace}/services: delete: description: delete collection of Service @@ -12363,7 +12748,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: list or watch objects of kind Service operationId: listNamespacedService @@ -12494,7 +12882,12 @@ paths: group: "" kind: Service version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml post: description: create a Service operationId: createNamespacedService @@ -12599,7 +12992,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /api/v1/namespaces/{namespace}/services/{name}: delete: description: delete a Service @@ -12703,7 +13099,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: read the specified Service operationId: readNamespacedService @@ -12750,7 +13149,10 @@ paths: group: "" kind: Service version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update the specified Service operationId: patchNamespacedService @@ -12858,7 +13260,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace the specified Service operationId: replaceNamespacedService @@ -12957,7 +13362,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /api/v1/namespaces/{namespace}/services/{name}/proxy: delete: description: connect DELETE requests to proxy of Service @@ -13000,7 +13408,8 @@ paths: group: "" kind: ServiceProxyOptions version: v1 - x-accepts: '*/*' + x-accepts: + - '*/*' get: description: connect GET requests to proxy of Service operationId: connectGetNamespacedServiceProxy @@ -13042,7 +13451,8 @@ paths: group: "" kind: ServiceProxyOptions version: v1 - x-accepts: '*/*' + x-accepts: + - '*/*' head: description: connect HEAD requests to proxy of Service operationId: connectHeadNamespacedServiceProxy @@ -13084,7 +13494,8 @@ paths: group: "" kind: ServiceProxyOptions version: v1 - x-accepts: '*/*' + x-accepts: + - '*/*' options: description: connect OPTIONS requests to proxy of Service operationId: connectOptionsNamespacedServiceProxy @@ -13126,7 +13537,8 @@ paths: group: "" kind: ServiceProxyOptions version: v1 - x-accepts: '*/*' + x-accepts: + - '*/*' patch: description: connect PATCH requests to proxy of Service operationId: connectPatchNamespacedServiceProxy @@ -13168,7 +13580,8 @@ paths: group: "" kind: ServiceProxyOptions version: v1 - x-accepts: '*/*' + x-accepts: + - '*/*' post: description: connect POST requests to proxy of Service operationId: connectPostNamespacedServiceProxy @@ -13210,7 +13623,8 @@ paths: group: "" kind: ServiceProxyOptions version: v1 - x-accepts: '*/*' + x-accepts: + - '*/*' put: description: connect PUT requests to proxy of Service operationId: connectPutNamespacedServiceProxy @@ -13252,7 +13666,8 @@ paths: group: "" kind: ServiceProxyOptions version: v1 - x-accepts: '*/*' + x-accepts: + - '*/*' /api/v1/namespaces/{namespace}/services/{name}/proxy/{path}: delete: description: connect DELETE requests to proxy of Service @@ -13301,7 +13716,8 @@ paths: group: "" kind: ServiceProxyOptions version: v1 - x-accepts: '*/*' + x-accepts: + - '*/*' get: description: connect GET requests to proxy of Service operationId: connectGetNamespacedServiceProxyWithPath @@ -13349,7 +13765,8 @@ paths: group: "" kind: ServiceProxyOptions version: v1 - x-accepts: '*/*' + x-accepts: + - '*/*' head: description: connect HEAD requests to proxy of Service operationId: connectHeadNamespacedServiceProxyWithPath @@ -13397,7 +13814,8 @@ paths: group: "" kind: ServiceProxyOptions version: v1 - x-accepts: '*/*' + x-accepts: + - '*/*' options: description: connect OPTIONS requests to proxy of Service operationId: connectOptionsNamespacedServiceProxyWithPath @@ -13445,7 +13863,8 @@ paths: group: "" kind: ServiceProxyOptions version: v1 - x-accepts: '*/*' + x-accepts: + - '*/*' patch: description: connect PATCH requests to proxy of Service operationId: connectPatchNamespacedServiceProxyWithPath @@ -13493,7 +13912,8 @@ paths: group: "" kind: ServiceProxyOptions version: v1 - x-accepts: '*/*' + x-accepts: + - '*/*' post: description: connect POST requests to proxy of Service operationId: connectPostNamespacedServiceProxyWithPath @@ -13541,7 +13961,8 @@ paths: group: "" kind: ServiceProxyOptions version: v1 - x-accepts: '*/*' + x-accepts: + - '*/*' put: description: connect PUT requests to proxy of Service operationId: connectPutNamespacedServiceProxyWithPath @@ -13589,7 +14010,8 @@ paths: group: "" kind: ServiceProxyOptions version: v1 - x-accepts: '*/*' + x-accepts: + - '*/*' /api/v1/namespaces/{namespace}/services/{name}/status: get: description: read status of the specified Service @@ -13637,7 +14059,10 @@ paths: group: "" kind: Service version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update status of the specified Service operationId: patchNamespacedServiceStatus @@ -13745,7 +14170,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace status of the specified Service operationId: replaceNamespacedServiceStatus @@ -13844,7 +14272,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /api/v1/namespaces/{name}: delete: description: delete a Namespace @@ -13942,7 +14373,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: read the specified Namespace operationId: readNamespace @@ -13983,7 +14417,10 @@ paths: group: "" kind: Namespace version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update the specified Namespace operationId: patchNamespace @@ -14085,7 +14522,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace the specified Namespace operationId: replaceNamespace @@ -14178,7 +14618,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /api/v1/namespaces/{name}/finalize: put: description: replace finalize of the specified Namespace @@ -14272,7 +14715,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /api/v1/namespaces/{name}/status: get: description: read status of the specified Namespace @@ -14314,7 +14760,10 @@ paths: group: "" kind: Namespace version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update status of the specified Namespace operationId: patchNamespaceStatus @@ -14416,7 +14865,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace status of the specified Namespace operationId: replaceNamespaceStatus @@ -14509,7 +14961,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /api/v1/nodes: delete: description: delete collection of Node @@ -14657,7 +15112,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: list or watch objects of kind Node operationId: listNode @@ -14782,7 +15240,12 @@ paths: group: "" kind: Node version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml post: description: create a Node operationId: createNode @@ -14881,7 +15344,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /api/v1/nodes/{name}: delete: description: delete a Node @@ -14979,7 +15445,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: read the specified Node operationId: readNode @@ -15020,7 +15489,10 @@ paths: group: "" kind: Node version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update the specified Node operationId: patchNode @@ -15122,7 +15594,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace the specified Node operationId: replaceNode @@ -15215,7 +15690,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /api/v1/nodes/{name}/proxy: delete: description: connect DELETE requests to proxy of Node @@ -15250,7 +15728,8 @@ paths: group: "" kind: NodeProxyOptions version: v1 - x-accepts: '*/*' + x-accepts: + - '*/*' get: description: connect GET requests to proxy of Node operationId: connectGetNodeProxy @@ -15284,7 +15763,8 @@ paths: group: "" kind: NodeProxyOptions version: v1 - x-accepts: '*/*' + x-accepts: + - '*/*' head: description: connect HEAD requests to proxy of Node operationId: connectHeadNodeProxy @@ -15318,7 +15798,8 @@ paths: group: "" kind: NodeProxyOptions version: v1 - x-accepts: '*/*' + x-accepts: + - '*/*' options: description: connect OPTIONS requests to proxy of Node operationId: connectOptionsNodeProxy @@ -15352,7 +15833,8 @@ paths: group: "" kind: NodeProxyOptions version: v1 - x-accepts: '*/*' + x-accepts: + - '*/*' patch: description: connect PATCH requests to proxy of Node operationId: connectPatchNodeProxy @@ -15386,7 +15868,8 @@ paths: group: "" kind: NodeProxyOptions version: v1 - x-accepts: '*/*' + x-accepts: + - '*/*' post: description: connect POST requests to proxy of Node operationId: connectPostNodeProxy @@ -15420,7 +15903,8 @@ paths: group: "" kind: NodeProxyOptions version: v1 - x-accepts: '*/*' + x-accepts: + - '*/*' put: description: connect PUT requests to proxy of Node operationId: connectPutNodeProxy @@ -15454,7 +15938,8 @@ paths: group: "" kind: NodeProxyOptions version: v1 - x-accepts: '*/*' + x-accepts: + - '*/*' /api/v1/nodes/{name}/proxy/{path}: delete: description: connect DELETE requests to proxy of Node @@ -15495,7 +15980,8 @@ paths: group: "" kind: NodeProxyOptions version: v1 - x-accepts: '*/*' + x-accepts: + - '*/*' get: description: connect GET requests to proxy of Node operationId: connectGetNodeProxyWithPath @@ -15535,7 +16021,8 @@ paths: group: "" kind: NodeProxyOptions version: v1 - x-accepts: '*/*' + x-accepts: + - '*/*' head: description: connect HEAD requests to proxy of Node operationId: connectHeadNodeProxyWithPath @@ -15575,7 +16062,8 @@ paths: group: "" kind: NodeProxyOptions version: v1 - x-accepts: '*/*' + x-accepts: + - '*/*' options: description: connect OPTIONS requests to proxy of Node operationId: connectOptionsNodeProxyWithPath @@ -15615,7 +16103,8 @@ paths: group: "" kind: NodeProxyOptions version: v1 - x-accepts: '*/*' + x-accepts: + - '*/*' patch: description: connect PATCH requests to proxy of Node operationId: connectPatchNodeProxyWithPath @@ -15655,7 +16144,8 @@ paths: group: "" kind: NodeProxyOptions version: v1 - x-accepts: '*/*' + x-accepts: + - '*/*' post: description: connect POST requests to proxy of Node operationId: connectPostNodeProxyWithPath @@ -15695,7 +16185,8 @@ paths: group: "" kind: NodeProxyOptions version: v1 - x-accepts: '*/*' + x-accepts: + - '*/*' put: description: connect PUT requests to proxy of Node operationId: connectPutNodeProxyWithPath @@ -15735,7 +16226,8 @@ paths: group: "" kind: NodeProxyOptions version: v1 - x-accepts: '*/*' + x-accepts: + - '*/*' /api/v1/nodes/{name}/status: get: description: read status of the specified Node @@ -15777,7 +16269,10 @@ paths: group: "" kind: Node version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update status of the specified Node operationId: patchNodeStatus @@ -15879,7 +16374,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace status of the specified Node operationId: replaceNodeStatus @@ -15972,7 +16470,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /api/v1/persistentvolumeclaims: get: description: list or watch objects of kind PersistentVolumeClaim @@ -16098,7 +16599,12 @@ paths: group: "" kind: PersistentVolumeClaim version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml /api/v1/persistentvolumes: delete: description: delete collection of PersistentVolume @@ -16246,7 +16752,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: list or watch objects of kind PersistentVolume operationId: listPersistentVolume @@ -16371,7 +16880,12 @@ paths: group: "" kind: PersistentVolume version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml post: description: create a PersistentVolume operationId: createPersistentVolume @@ -16470,7 +16984,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /api/v1/persistentvolumes/{name}: delete: description: delete a PersistentVolume @@ -16568,7 +17085,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: read the specified PersistentVolume operationId: readPersistentVolume @@ -16609,7 +17129,10 @@ paths: group: "" kind: PersistentVolume version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update the specified PersistentVolume operationId: patchPersistentVolume @@ -16711,7 +17234,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace the specified PersistentVolume operationId: replacePersistentVolume @@ -16804,7 +17330,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /api/v1/persistentvolumes/{name}/status: get: description: read status of the specified PersistentVolume @@ -16846,7 +17375,10 @@ paths: group: "" kind: PersistentVolume version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update status of the specified PersistentVolume operationId: patchPersistentVolumeStatus @@ -16948,7 +17480,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace status of the specified PersistentVolume operationId: replacePersistentVolumeStatus @@ -17041,7 +17576,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /api/v1/pods: get: description: list or watch objects of kind Pod @@ -17167,7 +17705,12 @@ paths: group: "" kind: Pod version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml /api/v1/podtemplates: get: description: list or watch objects of kind PodTemplate @@ -17293,7 +17836,12 @@ paths: group: "" kind: PodTemplate version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml /api/v1/replicationcontrollers: get: description: list or watch objects of kind ReplicationController @@ -17419,7 +17967,12 @@ paths: group: "" kind: ReplicationController version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml /api/v1/resourcequotas: get: description: list or watch objects of kind ResourceQuota @@ -17545,7 +18098,12 @@ paths: group: "" kind: ResourceQuota version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml /api/v1/secrets: get: description: list or watch objects of kind Secret @@ -17671,7 +18229,12 @@ paths: group: "" kind: Secret version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml /api/v1/serviceaccounts: get: description: list or watch objects of kind ServiceAccount @@ -17797,7 +18360,12 @@ paths: group: "" kind: ServiceAccount version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml /api/v1/services: get: description: list or watch objects of kind Service @@ -17923,7 +18491,12 @@ paths: group: "" kind: Service version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml /api/v1/watch/configmaps: {} /api/v1/watch/endpoints: {} /api/v1/watch/events: {} @@ -17988,7 +18561,10 @@ paths: description: Unauthorized tags: - apis - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/admissionregistration.k8s.io/: get: description: get information of a group @@ -18011,7 +18587,10 @@ paths: description: Unauthorized tags: - admissionregistration - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/admissionregistration.k8s.io/v1/: get: description: get available resources @@ -18034,7 +18613,10 @@ paths: description: Unauthorized tags: - admissionregistration_v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations: delete: description: delete collection of MutatingWebhookConfiguration @@ -18182,7 +18764,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: list or watch objects of kind MutatingWebhookConfiguration operationId: listMutatingWebhookConfiguration @@ -18307,7 +18892,12 @@ paths: group: admissionregistration.k8s.io kind: MutatingWebhookConfiguration version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml post: description: create a MutatingWebhookConfiguration operationId: createMutatingWebhookConfiguration @@ -18406,7 +18996,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations/{name}: delete: description: delete a MutatingWebhookConfiguration @@ -18504,7 +19097,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: read the specified MutatingWebhookConfiguration operationId: readMutatingWebhookConfiguration @@ -18545,7 +19141,10 @@ paths: group: admissionregistration.k8s.io kind: MutatingWebhookConfiguration version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update the specified MutatingWebhookConfiguration operationId: patchMutatingWebhookConfiguration @@ -18647,7 +19246,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace the specified MutatingWebhookConfiguration operationId: replaceMutatingWebhookConfiguration @@ -18740,7 +19342,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies: delete: description: delete collection of ValidatingAdmissionPolicy @@ -18888,7 +19493,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: list or watch objects of kind ValidatingAdmissionPolicy operationId: listValidatingAdmissionPolicy @@ -19013,7 +19621,12 @@ paths: group: admissionregistration.k8s.io kind: ValidatingAdmissionPolicy version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml post: description: create a ValidatingAdmissionPolicy operationId: createValidatingAdmissionPolicy @@ -19112,7 +19725,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies/{name}: delete: description: delete a ValidatingAdmissionPolicy @@ -19210,7 +19826,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: read the specified ValidatingAdmissionPolicy operationId: readValidatingAdmissionPolicy @@ -19251,7 +19870,10 @@ paths: group: admissionregistration.k8s.io kind: ValidatingAdmissionPolicy version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update the specified ValidatingAdmissionPolicy operationId: patchValidatingAdmissionPolicy @@ -19353,7 +19975,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace the specified ValidatingAdmissionPolicy operationId: replaceValidatingAdmissionPolicy @@ -19446,7 +20071,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies/{name}/status: get: description: read status of the specified ValidatingAdmissionPolicy @@ -19488,7 +20116,10 @@ paths: group: admissionregistration.k8s.io kind: ValidatingAdmissionPolicy version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update status of the specified ValidatingAdmissionPolicy operationId: patchValidatingAdmissionPolicyStatus @@ -19590,7 +20221,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace status of the specified ValidatingAdmissionPolicy operationId: replaceValidatingAdmissionPolicyStatus @@ -19683,7 +20317,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/admissionregistration.k8s.io/v1/validatingadmissionpolicybindings: delete: description: delete collection of ValidatingAdmissionPolicyBinding @@ -19831,7 +20468,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: list or watch objects of kind ValidatingAdmissionPolicyBinding operationId: listValidatingAdmissionPolicyBinding @@ -19956,7 +20596,12 @@ paths: group: admissionregistration.k8s.io kind: ValidatingAdmissionPolicyBinding version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml post: description: create a ValidatingAdmissionPolicyBinding operationId: createValidatingAdmissionPolicyBinding @@ -20055,7 +20700,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/admissionregistration.k8s.io/v1/validatingadmissionpolicybindings/{name}: delete: description: delete a ValidatingAdmissionPolicyBinding @@ -20153,7 +20801,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: read the specified ValidatingAdmissionPolicyBinding operationId: readValidatingAdmissionPolicyBinding @@ -20194,7 +20845,10 @@ paths: group: admissionregistration.k8s.io kind: ValidatingAdmissionPolicyBinding version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update the specified ValidatingAdmissionPolicyBinding operationId: patchValidatingAdmissionPolicyBinding @@ -20296,7 +20950,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace the specified ValidatingAdmissionPolicyBinding operationId: replaceValidatingAdmissionPolicyBinding @@ -20389,7 +21046,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations: delete: description: delete collection of ValidatingWebhookConfiguration @@ -20537,7 +21197,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: list or watch objects of kind ValidatingWebhookConfiguration operationId: listValidatingWebhookConfiguration @@ -20662,7 +21325,12 @@ paths: group: admissionregistration.k8s.io kind: ValidatingWebhookConfiguration version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml post: description: create a ValidatingWebhookConfiguration operationId: createValidatingWebhookConfiguration @@ -20761,7 +21429,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations/{name}: delete: description: delete a ValidatingWebhookConfiguration @@ -20859,7 +21530,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: read the specified ValidatingWebhookConfiguration operationId: readValidatingWebhookConfiguration @@ -20900,7 +21574,10 @@ paths: group: admissionregistration.k8s.io kind: ValidatingWebhookConfiguration version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update the specified ValidatingWebhookConfiguration operationId: patchValidatingWebhookConfiguration @@ -21002,7 +21679,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace the specified ValidatingWebhookConfiguration operationId: replaceValidatingWebhookConfiguration @@ -21095,7 +21775,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/admissionregistration.k8s.io/v1/watch/mutatingwebhookconfigurations: {} /apis/admissionregistration.k8s.io/v1/watch/mutatingwebhookconfigurations/{name}: {} /apis/admissionregistration.k8s.io/v1/watch/validatingadmissionpolicies: {} @@ -21126,7 +21809,10 @@ paths: description: Unauthorized tags: - admissionregistration_v1alpha1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies: delete: description: delete collection of ValidatingAdmissionPolicy @@ -21274,7 +21960,10 @@ paths: version: v1alpha1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: list or watch objects of kind ValidatingAdmissionPolicy operationId: listValidatingAdmissionPolicy @@ -21399,7 +22088,12 @@ paths: group: admissionregistration.k8s.io kind: ValidatingAdmissionPolicy version: v1alpha1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml post: description: create a ValidatingAdmissionPolicy operationId: createValidatingAdmissionPolicy @@ -21498,7 +22192,10 @@ paths: version: v1alpha1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies/{name}: delete: description: delete a ValidatingAdmissionPolicy @@ -21596,7 +22293,10 @@ paths: version: v1alpha1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: read the specified ValidatingAdmissionPolicy operationId: readValidatingAdmissionPolicy @@ -21637,7 +22337,10 @@ paths: group: admissionregistration.k8s.io kind: ValidatingAdmissionPolicy version: v1alpha1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update the specified ValidatingAdmissionPolicy operationId: patchValidatingAdmissionPolicy @@ -21739,7 +22442,10 @@ paths: version: v1alpha1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace the specified ValidatingAdmissionPolicy operationId: replaceValidatingAdmissionPolicy @@ -21832,7 +22538,10 @@ paths: version: v1alpha1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies/{name}/status: get: description: read status of the specified ValidatingAdmissionPolicy @@ -21874,7 +22583,10 @@ paths: group: admissionregistration.k8s.io kind: ValidatingAdmissionPolicy version: v1alpha1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update status of the specified ValidatingAdmissionPolicy operationId: patchValidatingAdmissionPolicyStatus @@ -21976,7 +22688,10 @@ paths: version: v1alpha1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace status of the specified ValidatingAdmissionPolicy operationId: replaceValidatingAdmissionPolicyStatus @@ -22069,7 +22784,10 @@ paths: version: v1alpha1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicybindings: delete: description: delete collection of ValidatingAdmissionPolicyBinding @@ -22217,7 +22935,10 @@ paths: version: v1alpha1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: list or watch objects of kind ValidatingAdmissionPolicyBinding operationId: listValidatingAdmissionPolicyBinding @@ -22342,7 +23063,12 @@ paths: group: admissionregistration.k8s.io kind: ValidatingAdmissionPolicyBinding version: v1alpha1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml post: description: create a ValidatingAdmissionPolicyBinding operationId: createValidatingAdmissionPolicyBinding @@ -22441,7 +23167,10 @@ paths: version: v1alpha1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicybindings/{name}: delete: description: delete a ValidatingAdmissionPolicyBinding @@ -22539,7 +23268,10 @@ paths: version: v1alpha1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: read the specified ValidatingAdmissionPolicyBinding operationId: readValidatingAdmissionPolicyBinding @@ -22580,7 +23312,10 @@ paths: group: admissionregistration.k8s.io kind: ValidatingAdmissionPolicyBinding version: v1alpha1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update the specified ValidatingAdmissionPolicyBinding operationId: patchValidatingAdmissionPolicyBinding @@ -22682,7 +23417,10 @@ paths: version: v1alpha1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace the specified ValidatingAdmissionPolicyBinding operationId: replaceValidatingAdmissionPolicyBinding @@ -22775,7 +23513,10 @@ paths: version: v1alpha1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/admissionregistration.k8s.io/v1alpha1/watch/validatingadmissionpolicies: {} /apis/admissionregistration.k8s.io/v1alpha1/watch/validatingadmissionpolicies/{name}: {} /apis/admissionregistration.k8s.io/v1alpha1/watch/validatingadmissionpolicybindings: {} @@ -22802,7 +23543,10 @@ paths: description: Unauthorized tags: - admissionregistration_v1beta1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies: delete: description: delete collection of ValidatingAdmissionPolicy @@ -22950,7 +23694,10 @@ paths: version: v1beta1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: list or watch objects of kind ValidatingAdmissionPolicy operationId: listValidatingAdmissionPolicy @@ -23075,7 +23822,12 @@ paths: group: admissionregistration.k8s.io kind: ValidatingAdmissionPolicy version: v1beta1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml post: description: create a ValidatingAdmissionPolicy operationId: createValidatingAdmissionPolicy @@ -23174,7 +23926,10 @@ paths: version: v1beta1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name}: delete: description: delete a ValidatingAdmissionPolicy @@ -23272,7 +24027,10 @@ paths: version: v1beta1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: read the specified ValidatingAdmissionPolicy operationId: readValidatingAdmissionPolicy @@ -23313,7 +24071,10 @@ paths: group: admissionregistration.k8s.io kind: ValidatingAdmissionPolicy version: v1beta1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update the specified ValidatingAdmissionPolicy operationId: patchValidatingAdmissionPolicy @@ -23415,7 +24176,10 @@ paths: version: v1beta1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace the specified ValidatingAdmissionPolicy operationId: replaceValidatingAdmissionPolicy @@ -23508,7 +24272,10 @@ paths: version: v1beta1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name}/status: get: description: read status of the specified ValidatingAdmissionPolicy @@ -23550,7 +24317,10 @@ paths: group: admissionregistration.k8s.io kind: ValidatingAdmissionPolicy version: v1beta1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update status of the specified ValidatingAdmissionPolicy operationId: patchValidatingAdmissionPolicyStatus @@ -23652,7 +24422,10 @@ paths: version: v1beta1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace status of the specified ValidatingAdmissionPolicy operationId: replaceValidatingAdmissionPolicyStatus @@ -23745,7 +24518,10 @@ paths: version: v1beta1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings: delete: description: delete collection of ValidatingAdmissionPolicyBinding @@ -23893,7 +24669,10 @@ paths: version: v1beta1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: list or watch objects of kind ValidatingAdmissionPolicyBinding operationId: listValidatingAdmissionPolicyBinding @@ -24018,7 +24797,12 @@ paths: group: admissionregistration.k8s.io kind: ValidatingAdmissionPolicyBinding version: v1beta1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml post: description: create a ValidatingAdmissionPolicyBinding operationId: createValidatingAdmissionPolicyBinding @@ -24117,7 +24901,10 @@ paths: version: v1beta1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings/{name}: delete: description: delete a ValidatingAdmissionPolicyBinding @@ -24215,7 +25002,10 @@ paths: version: v1beta1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: read the specified ValidatingAdmissionPolicyBinding operationId: readValidatingAdmissionPolicyBinding @@ -24256,7 +25046,10 @@ paths: group: admissionregistration.k8s.io kind: ValidatingAdmissionPolicyBinding version: v1beta1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update the specified ValidatingAdmissionPolicyBinding operationId: patchValidatingAdmissionPolicyBinding @@ -24358,7 +25151,10 @@ paths: version: v1beta1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace the specified ValidatingAdmissionPolicyBinding operationId: replaceValidatingAdmissionPolicyBinding @@ -24451,7 +25247,10 @@ paths: version: v1beta1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/admissionregistration.k8s.io/v1beta1/watch/validatingadmissionpolicies: {} /apis/admissionregistration.k8s.io/v1beta1/watch/validatingadmissionpolicies/{name}: {} /apis/admissionregistration.k8s.io/v1beta1/watch/validatingadmissionpolicybindings: {} @@ -24478,7 +25277,10 @@ paths: description: Unauthorized tags: - apiextensions - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/apiextensions.k8s.io/v1/: get: description: get available resources @@ -24501,7 +25303,10 @@ paths: description: Unauthorized tags: - apiextensions_v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/apiextensions.k8s.io/v1/customresourcedefinitions: delete: description: delete collection of CustomResourceDefinition @@ -24649,7 +25454,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: list or watch objects of kind CustomResourceDefinition operationId: listCustomResourceDefinition @@ -24774,7 +25582,12 @@ paths: group: apiextensions.k8s.io kind: CustomResourceDefinition version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml post: description: create a CustomResourceDefinition operationId: createCustomResourceDefinition @@ -24873,7 +25686,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}: delete: description: delete a CustomResourceDefinition @@ -24971,7 +25787,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: read the specified CustomResourceDefinition operationId: readCustomResourceDefinition @@ -25012,7 +25831,10 @@ paths: group: apiextensions.k8s.io kind: CustomResourceDefinition version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update the specified CustomResourceDefinition operationId: patchCustomResourceDefinition @@ -25114,7 +25936,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace the specified CustomResourceDefinition operationId: replaceCustomResourceDefinition @@ -25207,7 +26032,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}/status: get: description: read status of the specified CustomResourceDefinition @@ -25249,7 +26077,10 @@ paths: group: apiextensions.k8s.io kind: CustomResourceDefinition version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update status of the specified CustomResourceDefinition operationId: patchCustomResourceDefinitionStatus @@ -25351,7 +26182,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace status of the specified CustomResourceDefinition operationId: replaceCustomResourceDefinitionStatus @@ -25444,7 +26278,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/apiextensions.k8s.io/v1/watch/customresourcedefinitions: {} /apis/apiextensions.k8s.io/v1/watch/customresourcedefinitions/{name}: {} /apis/apiregistration.k8s.io/: @@ -25469,7 +26306,10 @@ paths: description: Unauthorized tags: - apiregistration - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/apiregistration.k8s.io/v1/: get: description: get available resources @@ -25492,7 +26332,10 @@ paths: description: Unauthorized tags: - apiregistration_v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/apiregistration.k8s.io/v1/apiservices: delete: description: delete collection of APIService @@ -25640,7 +26483,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: list or watch objects of kind APIService operationId: listAPIService @@ -25765,7 +26611,12 @@ paths: group: apiregistration.k8s.io kind: APIService version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml post: description: create an APIService operationId: createAPIService @@ -25864,7 +26715,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/apiregistration.k8s.io/v1/apiservices/{name}: delete: description: delete an APIService @@ -25962,7 +26816,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: read the specified APIService operationId: readAPIService @@ -26003,7 +26860,10 @@ paths: group: apiregistration.k8s.io kind: APIService version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update the specified APIService operationId: patchAPIService @@ -26105,7 +26965,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace the specified APIService operationId: replaceAPIService @@ -26198,7 +27061,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/apiregistration.k8s.io/v1/apiservices/{name}/status: get: description: read status of the specified APIService @@ -26240,7 +27106,10 @@ paths: group: apiregistration.k8s.io kind: APIService version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update status of the specified APIService operationId: patchAPIServiceStatus @@ -26342,7 +27211,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace status of the specified APIService operationId: replaceAPIServiceStatus @@ -26435,7 +27307,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/apiregistration.k8s.io/v1/watch/apiservices: {} /apis/apiregistration.k8s.io/v1/watch/apiservices/{name}: {} /apis/apps/: @@ -26460,7 +27335,10 @@ paths: description: Unauthorized tags: - apps - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/apps/v1/: get: description: get available resources @@ -26483,7 +27361,10 @@ paths: description: Unauthorized tags: - apps_v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/apps/v1/controllerrevisions: get: description: list or watch objects of kind ControllerRevision @@ -26609,7 +27490,12 @@ paths: group: apps kind: ControllerRevision version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml /apis/apps/v1/daemonsets: get: description: list or watch objects of kind DaemonSet @@ -26735,7 +27621,12 @@ paths: group: apps kind: DaemonSet version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml /apis/apps/v1/deployments: get: description: list or watch objects of kind Deployment @@ -26861,7 +27752,12 @@ paths: group: apps kind: Deployment version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml /apis/apps/v1/namespaces/{namespace}/controllerrevisions: delete: description: delete collection of ControllerRevision @@ -27015,7 +27911,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: list or watch objects of kind ControllerRevision operationId: listNamespacedControllerRevision @@ -27146,7 +28045,12 @@ paths: group: apps kind: ControllerRevision version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml post: description: create a ControllerRevision operationId: createNamespacedControllerRevision @@ -27251,7 +28155,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name}: delete: description: delete a ControllerRevision @@ -27355,7 +28262,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: read the specified ControllerRevision operationId: readNamespacedControllerRevision @@ -27402,7 +28312,10 @@ paths: group: apps kind: ControllerRevision version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update the specified ControllerRevision operationId: patchNamespacedControllerRevision @@ -27510,7 +28423,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace the specified ControllerRevision operationId: replaceNamespacedControllerRevision @@ -27609,7 +28525,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/apps/v1/namespaces/{namespace}/daemonsets: delete: description: delete collection of DaemonSet @@ -27763,7 +28682,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: list or watch objects of kind DaemonSet operationId: listNamespacedDaemonSet @@ -27894,7 +28816,12 @@ paths: group: apps kind: DaemonSet version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml post: description: create a DaemonSet operationId: createNamespacedDaemonSet @@ -27999,7 +28926,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/apps/v1/namespaces/{namespace}/daemonsets/{name}: delete: description: delete a DaemonSet @@ -28103,7 +29033,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: read the specified DaemonSet operationId: readNamespacedDaemonSet @@ -28150,7 +29083,10 @@ paths: group: apps kind: DaemonSet version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update the specified DaemonSet operationId: patchNamespacedDaemonSet @@ -28258,7 +29194,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace the specified DaemonSet operationId: replaceNamespacedDaemonSet @@ -28357,7 +29296,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/apps/v1/namespaces/{namespace}/daemonsets/{name}/status: get: description: read status of the specified DaemonSet @@ -28405,7 +29347,10 @@ paths: group: apps kind: DaemonSet version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update status of the specified DaemonSet operationId: patchNamespacedDaemonSetStatus @@ -28513,7 +29458,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace status of the specified DaemonSet operationId: replaceNamespacedDaemonSetStatus @@ -28612,7 +29560,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/apps/v1/namespaces/{namespace}/deployments: delete: description: delete collection of Deployment @@ -28766,7 +29717,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: list or watch objects of kind Deployment operationId: listNamespacedDeployment @@ -28897,7 +29851,12 @@ paths: group: apps kind: Deployment version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml post: description: create a Deployment operationId: createNamespacedDeployment @@ -29002,7 +29961,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/apps/v1/namespaces/{namespace}/deployments/{name}: delete: description: delete a Deployment @@ -29106,7 +30068,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: read the specified Deployment operationId: readNamespacedDeployment @@ -29153,7 +30118,10 @@ paths: group: apps kind: Deployment version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update the specified Deployment operationId: patchNamespacedDeployment @@ -29261,7 +30229,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace the specified Deployment operationId: replaceNamespacedDeployment @@ -29360,7 +30331,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/apps/v1/namespaces/{namespace}/deployments/{name}/scale: get: description: read scale of the specified Deployment @@ -29408,7 +30382,10 @@ paths: group: autoscaling kind: Scale version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update scale of the specified Deployment operationId: patchNamespacedDeploymentScale @@ -29516,7 +30493,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace scale of the specified Deployment operationId: replaceNamespacedDeploymentScale @@ -29615,7 +30595,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/apps/v1/namespaces/{namespace}/deployments/{name}/status: get: description: read status of the specified Deployment @@ -29663,7 +30646,10 @@ paths: group: apps kind: Deployment version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update status of the specified Deployment operationId: patchNamespacedDeploymentStatus @@ -29771,7 +30757,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace status of the specified Deployment operationId: replaceNamespacedDeploymentStatus @@ -29870,7 +30859,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/apps/v1/namespaces/{namespace}/replicasets: delete: description: delete collection of ReplicaSet @@ -30024,7 +31016,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: list or watch objects of kind ReplicaSet operationId: listNamespacedReplicaSet @@ -30155,7 +31150,12 @@ paths: group: apps kind: ReplicaSet version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml post: description: create a ReplicaSet operationId: createNamespacedReplicaSet @@ -30260,7 +31260,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/apps/v1/namespaces/{namespace}/replicasets/{name}: delete: description: delete a ReplicaSet @@ -30364,7 +31367,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: read the specified ReplicaSet operationId: readNamespacedReplicaSet @@ -30411,7 +31417,10 @@ paths: group: apps kind: ReplicaSet version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update the specified ReplicaSet operationId: patchNamespacedReplicaSet @@ -30519,7 +31528,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace the specified ReplicaSet operationId: replaceNamespacedReplicaSet @@ -30618,7 +31630,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/apps/v1/namespaces/{namespace}/replicasets/{name}/scale: get: description: read scale of the specified ReplicaSet @@ -30666,7 +31681,10 @@ paths: group: autoscaling kind: Scale version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update scale of the specified ReplicaSet operationId: patchNamespacedReplicaSetScale @@ -30774,7 +31792,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace scale of the specified ReplicaSet operationId: replaceNamespacedReplicaSetScale @@ -30873,7 +31894,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/apps/v1/namespaces/{namespace}/replicasets/{name}/status: get: description: read status of the specified ReplicaSet @@ -30921,7 +31945,10 @@ paths: group: apps kind: ReplicaSet version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update status of the specified ReplicaSet operationId: patchNamespacedReplicaSetStatus @@ -31029,7 +32056,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace status of the specified ReplicaSet operationId: replaceNamespacedReplicaSetStatus @@ -31128,7 +32158,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/apps/v1/namespaces/{namespace}/statefulsets: delete: description: delete collection of StatefulSet @@ -31282,7 +32315,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: list or watch objects of kind StatefulSet operationId: listNamespacedStatefulSet @@ -31413,7 +32449,12 @@ paths: group: apps kind: StatefulSet version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml post: description: create a StatefulSet operationId: createNamespacedStatefulSet @@ -31518,7 +32559,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/apps/v1/namespaces/{namespace}/statefulsets/{name}: delete: description: delete a StatefulSet @@ -31622,7 +32666,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: read the specified StatefulSet operationId: readNamespacedStatefulSet @@ -31669,7 +32716,10 @@ paths: group: apps kind: StatefulSet version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update the specified StatefulSet operationId: patchNamespacedStatefulSet @@ -31777,7 +32827,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace the specified StatefulSet operationId: replaceNamespacedStatefulSet @@ -31876,7 +32929,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/scale: get: description: read scale of the specified StatefulSet @@ -31924,7 +32980,10 @@ paths: group: autoscaling kind: Scale version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update scale of the specified StatefulSet operationId: patchNamespacedStatefulSetScale @@ -32032,7 +33091,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace scale of the specified StatefulSet operationId: replaceNamespacedStatefulSetScale @@ -32131,7 +33193,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/status: get: description: read status of the specified StatefulSet @@ -32179,7 +33244,10 @@ paths: group: apps kind: StatefulSet version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update status of the specified StatefulSet operationId: patchNamespacedStatefulSetStatus @@ -32287,7 +33355,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace status of the specified StatefulSet operationId: replaceNamespacedStatefulSetStatus @@ -32386,7 +33457,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/apps/v1/replicasets: get: description: list or watch objects of kind ReplicaSet @@ -32512,7 +33586,12 @@ paths: group: apps kind: ReplicaSet version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml /apis/apps/v1/statefulsets: get: description: list or watch objects of kind StatefulSet @@ -32638,7 +33717,12 @@ paths: group: apps kind: StatefulSet version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml /apis/apps/v1/watch/controllerrevisions: {} /apis/apps/v1/watch/daemonsets: {} /apis/apps/v1/watch/deployments: {} @@ -32676,7 +33760,10 @@ paths: description: Unauthorized tags: - authentication - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/authentication.k8s.io/v1/: get: description: get available resources @@ -32699,7 +33786,10 @@ paths: description: Unauthorized tags: - authentication_v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/authentication.k8s.io/v1/selfsubjectreviews: post: description: create a SelfSubjectReview @@ -32799,7 +33889,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/authentication.k8s.io/v1/tokenreviews: post: description: create a TokenReview @@ -32899,7 +33992,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/authentication.k8s.io/v1alpha1/: get: description: get available resources @@ -32922,7 +34018,10 @@ paths: description: Unauthorized tags: - authentication_v1alpha1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/authentication.k8s.io/v1alpha1/selfsubjectreviews: post: description: create a SelfSubjectReview @@ -33022,7 +34121,10 @@ paths: version: v1alpha1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/authentication.k8s.io/v1beta1/: get: description: get available resources @@ -33045,7 +34147,10 @@ paths: description: Unauthorized tags: - authentication_v1beta1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/authentication.k8s.io/v1beta1/selfsubjectreviews: post: description: create a SelfSubjectReview @@ -33145,7 +34250,10 @@ paths: version: v1beta1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/authorization.k8s.io/: get: description: get information of a group @@ -33168,7 +34276,10 @@ paths: description: Unauthorized tags: - authorization - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/authorization.k8s.io/v1/: get: description: get available resources @@ -33191,7 +34302,10 @@ paths: description: Unauthorized tags: - authorization_v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/authorization.k8s.io/v1/namespaces/{namespace}/localsubjectaccessreviews: post: description: create a LocalSubjectAccessReview @@ -33297,7 +34411,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/authorization.k8s.io/v1/selfsubjectaccessreviews: post: description: create a SelfSubjectAccessReview @@ -33397,7 +34514,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/authorization.k8s.io/v1/selfsubjectrulesreviews: post: description: create a SelfSubjectRulesReview @@ -33497,7 +34617,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/authorization.k8s.io/v1/subjectaccessreviews: post: description: create a SubjectAccessReview @@ -33597,7 +34720,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/autoscaling/: get: description: get information of a group @@ -33620,7 +34746,10 @@ paths: description: Unauthorized tags: - autoscaling - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/autoscaling/v1/: get: description: get available resources @@ -33643,7 +34772,10 @@ paths: description: Unauthorized tags: - autoscaling_v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/autoscaling/v1/horizontalpodautoscalers: get: description: list or watch objects of kind HorizontalPodAutoscaler @@ -33769,7 +34901,12 @@ paths: group: autoscaling kind: HorizontalPodAutoscaler version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers: delete: description: delete collection of HorizontalPodAutoscaler @@ -33923,7 +35060,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: list or watch objects of kind HorizontalPodAutoscaler operationId: listNamespacedHorizontalPodAutoscaler @@ -34054,7 +35194,12 @@ paths: group: autoscaling kind: HorizontalPodAutoscaler version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml post: description: create a HorizontalPodAutoscaler operationId: createNamespacedHorizontalPodAutoscaler @@ -34159,7 +35304,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}: delete: description: delete a HorizontalPodAutoscaler @@ -34263,7 +35411,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: read the specified HorizontalPodAutoscaler operationId: readNamespacedHorizontalPodAutoscaler @@ -34310,7 +35461,10 @@ paths: group: autoscaling kind: HorizontalPodAutoscaler version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update the specified HorizontalPodAutoscaler operationId: patchNamespacedHorizontalPodAutoscaler @@ -34418,7 +35572,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace the specified HorizontalPodAutoscaler operationId: replaceNamespacedHorizontalPodAutoscaler @@ -34517,7 +35674,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status: get: description: read status of the specified HorizontalPodAutoscaler @@ -34565,7 +35725,10 @@ paths: group: autoscaling kind: HorizontalPodAutoscaler version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update status of the specified HorizontalPodAutoscaler operationId: patchNamespacedHorizontalPodAutoscalerStatus @@ -34673,7 +35836,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace status of the specified HorizontalPodAutoscaler operationId: replaceNamespacedHorizontalPodAutoscalerStatus @@ -34772,7 +35938,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/autoscaling/v1/watch/horizontalpodautoscalers: {} /apis/autoscaling/v1/watch/namespaces/{namespace}/horizontalpodautoscalers: {} /apis/autoscaling/v1/watch/namespaces/{namespace}/horizontalpodautoscalers/{name}: {} @@ -34798,7 +35967,10 @@ paths: description: Unauthorized tags: - autoscaling_v2 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/autoscaling/v2/horizontalpodautoscalers: get: description: list or watch objects of kind HorizontalPodAutoscaler @@ -34924,7 +36096,12 @@ paths: group: autoscaling kind: HorizontalPodAutoscaler version: v2 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml /apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers: delete: description: delete collection of HorizontalPodAutoscaler @@ -35078,7 +36255,10 @@ paths: version: v2 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: list or watch objects of kind HorizontalPodAutoscaler operationId: listNamespacedHorizontalPodAutoscaler @@ -35209,7 +36389,12 @@ paths: group: autoscaling kind: HorizontalPodAutoscaler version: v2 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml post: description: create a HorizontalPodAutoscaler operationId: createNamespacedHorizontalPodAutoscaler @@ -35314,7 +36499,10 @@ paths: version: v2 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name}: delete: description: delete a HorizontalPodAutoscaler @@ -35418,7 +36606,10 @@ paths: version: v2 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: read the specified HorizontalPodAutoscaler operationId: readNamespacedHorizontalPodAutoscaler @@ -35465,7 +36656,10 @@ paths: group: autoscaling kind: HorizontalPodAutoscaler version: v2 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update the specified HorizontalPodAutoscaler operationId: patchNamespacedHorizontalPodAutoscaler @@ -35573,7 +36767,10 @@ paths: version: v2 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace the specified HorizontalPodAutoscaler operationId: replaceNamespacedHorizontalPodAutoscaler @@ -35672,7 +36869,10 @@ paths: version: v2 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name}/status: get: description: read status of the specified HorizontalPodAutoscaler @@ -35720,7 +36920,10 @@ paths: group: autoscaling kind: HorizontalPodAutoscaler version: v2 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update status of the specified HorizontalPodAutoscaler operationId: patchNamespacedHorizontalPodAutoscalerStatus @@ -35828,7 +37031,10 @@ paths: version: v2 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace status of the specified HorizontalPodAutoscaler operationId: replaceNamespacedHorizontalPodAutoscalerStatus @@ -35927,7 +37133,10 @@ paths: version: v2 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/autoscaling/v2/watch/horizontalpodautoscalers: {} /apis/autoscaling/v2/watch/namespaces/{namespace}/horizontalpodautoscalers: {} /apis/autoscaling/v2/watch/namespaces/{namespace}/horizontalpodautoscalers/{name}: {} @@ -35953,7 +37162,10 @@ paths: description: Unauthorized tags: - batch - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/batch/v1/: get: description: get available resources @@ -35976,7 +37188,10 @@ paths: description: Unauthorized tags: - batch_v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/batch/v1/cronjobs: get: description: list or watch objects of kind CronJob @@ -36102,7 +37317,12 @@ paths: group: batch kind: CronJob version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml /apis/batch/v1/jobs: get: description: list or watch objects of kind Job @@ -36228,7 +37448,12 @@ paths: group: batch kind: Job version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml /apis/batch/v1/namespaces/{namespace}/cronjobs: delete: description: delete collection of CronJob @@ -36382,7 +37607,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: list or watch objects of kind CronJob operationId: listNamespacedCronJob @@ -36513,7 +37741,12 @@ paths: group: batch kind: CronJob version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml post: description: create a CronJob operationId: createNamespacedCronJob @@ -36618,7 +37851,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/batch/v1/namespaces/{namespace}/cronjobs/{name}: delete: description: delete a CronJob @@ -36722,7 +37958,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: read the specified CronJob operationId: readNamespacedCronJob @@ -36769,7 +38008,10 @@ paths: group: batch kind: CronJob version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update the specified CronJob operationId: patchNamespacedCronJob @@ -36877,7 +38119,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace the specified CronJob operationId: replaceNamespacedCronJob @@ -36976,7 +38221,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/batch/v1/namespaces/{namespace}/cronjobs/{name}/status: get: description: read status of the specified CronJob @@ -37024,7 +38272,10 @@ paths: group: batch kind: CronJob version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update status of the specified CronJob operationId: patchNamespacedCronJobStatus @@ -37132,7 +38383,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace status of the specified CronJob operationId: replaceNamespacedCronJobStatus @@ -37231,7 +38485,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/batch/v1/namespaces/{namespace}/jobs: delete: description: delete collection of Job @@ -37385,7 +38642,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: list or watch objects of kind Job operationId: listNamespacedJob @@ -37516,7 +38776,12 @@ paths: group: batch kind: Job version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml post: description: create a Job operationId: createNamespacedJob @@ -37621,7 +38886,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/batch/v1/namespaces/{namespace}/jobs/{name}: delete: description: delete a Job @@ -37725,7 +38993,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: read the specified Job operationId: readNamespacedJob @@ -37772,7 +39043,10 @@ paths: group: batch kind: Job version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update the specified Job operationId: patchNamespacedJob @@ -37880,7 +39154,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace the specified Job operationId: replaceNamespacedJob @@ -37979,7 +39256,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/batch/v1/namespaces/{namespace}/jobs/{name}/status: get: description: read status of the specified Job @@ -38027,7 +39307,10 @@ paths: group: batch kind: Job version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update status of the specified Job operationId: patchNamespacedJobStatus @@ -38135,7 +39418,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace status of the specified Job operationId: replaceNamespacedJobStatus @@ -38234,7 +39520,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/batch/v1/watch/cronjobs: {} /apis/batch/v1/watch/jobs: {} /apis/batch/v1/watch/namespaces/{namespace}/cronjobs: {} @@ -38263,7 +39552,10 @@ paths: description: Unauthorized tags: - certificates - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/certificates.k8s.io/v1/: get: description: get available resources @@ -38286,7 +39578,10 @@ paths: description: Unauthorized tags: - certificates_v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/certificates.k8s.io/v1/certificatesigningrequests: delete: description: delete collection of CertificateSigningRequest @@ -38434,7 +39729,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: list or watch objects of kind CertificateSigningRequest operationId: listCertificateSigningRequest @@ -38559,7 +39857,12 @@ paths: group: certificates.k8s.io kind: CertificateSigningRequest version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml post: description: create a CertificateSigningRequest operationId: createCertificateSigningRequest @@ -38658,7 +39961,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/certificates.k8s.io/v1/certificatesigningrequests/{name}: delete: description: delete a CertificateSigningRequest @@ -38756,7 +40062,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: read the specified CertificateSigningRequest operationId: readCertificateSigningRequest @@ -38797,7 +40106,10 @@ paths: group: certificates.k8s.io kind: CertificateSigningRequest version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update the specified CertificateSigningRequest operationId: patchCertificateSigningRequest @@ -38899,7 +40211,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace the specified CertificateSigningRequest operationId: replaceCertificateSigningRequest @@ -38992,7 +40307,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/approval: get: description: read approval of the specified CertificateSigningRequest @@ -39034,7 +40352,10 @@ paths: group: certificates.k8s.io kind: CertificateSigningRequest version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update approval of the specified CertificateSigningRequest operationId: patchCertificateSigningRequestApproval @@ -39136,7 +40457,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace approval of the specified CertificateSigningRequest operationId: replaceCertificateSigningRequestApproval @@ -39229,7 +40553,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/status: get: description: read status of the specified CertificateSigningRequest @@ -39271,7 +40598,10 @@ paths: group: certificates.k8s.io kind: CertificateSigningRequest version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update status of the specified CertificateSigningRequest operationId: patchCertificateSigningRequestStatus @@ -39373,7 +40703,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace status of the specified CertificateSigningRequest operationId: replaceCertificateSigningRequestStatus @@ -39466,7 +40799,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/certificates.k8s.io/v1/watch/certificatesigningrequests: {} /apis/certificates.k8s.io/v1/watch/certificatesigningrequests/{name}: {} /apis/certificates.k8s.io/v1alpha1/: @@ -39491,7 +40827,10 @@ paths: description: Unauthorized tags: - certificates_v1alpha1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/certificates.k8s.io/v1alpha1/clustertrustbundles: delete: description: delete collection of ClusterTrustBundle @@ -39639,7 +40978,10 @@ paths: version: v1alpha1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: list or watch objects of kind ClusterTrustBundle operationId: listClusterTrustBundle @@ -39764,7 +41106,12 @@ paths: group: certificates.k8s.io kind: ClusterTrustBundle version: v1alpha1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml post: description: create a ClusterTrustBundle operationId: createClusterTrustBundle @@ -39863,7 +41210,10 @@ paths: version: v1alpha1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/certificates.k8s.io/v1alpha1/clustertrustbundles/{name}: delete: description: delete a ClusterTrustBundle @@ -39961,7 +41311,10 @@ paths: version: v1alpha1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: read the specified ClusterTrustBundle operationId: readClusterTrustBundle @@ -40002,7 +41355,10 @@ paths: group: certificates.k8s.io kind: ClusterTrustBundle version: v1alpha1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update the specified ClusterTrustBundle operationId: patchClusterTrustBundle @@ -40104,7 +41460,10 @@ paths: version: v1alpha1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace the specified ClusterTrustBundle operationId: replaceClusterTrustBundle @@ -40197,7 +41556,10 @@ paths: version: v1alpha1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/certificates.k8s.io/v1alpha1/watch/clustertrustbundles: {} /apis/certificates.k8s.io/v1alpha1/watch/clustertrustbundles/{name}: {} /apis/coordination.k8s.io/: @@ -40222,7 +41584,10 @@ paths: description: Unauthorized tags: - coordination - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/coordination.k8s.io/v1/: get: description: get available resources @@ -40245,7 +41610,10 @@ paths: description: Unauthorized tags: - coordination_v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/coordination.k8s.io/v1/leases: get: description: list or watch objects of kind Lease @@ -40371,7 +41739,12 @@ paths: group: coordination.k8s.io kind: Lease version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases: delete: description: delete collection of Lease @@ -40525,7 +41898,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: list or watch objects of kind Lease operationId: listNamespacedLease @@ -40656,7 +42032,12 @@ paths: group: coordination.k8s.io kind: Lease version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml post: description: create a Lease operationId: createNamespacedLease @@ -40761,7 +42142,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name}: delete: description: delete a Lease @@ -40865,7 +42249,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: read the specified Lease operationId: readNamespacedLease @@ -40912,7 +42299,10 @@ paths: group: coordination.k8s.io kind: Lease version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update the specified Lease operationId: patchNamespacedLease @@ -41020,7 +42410,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace the specified Lease operationId: replaceNamespacedLease @@ -41119,7 +42512,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/coordination.k8s.io/v1/watch/leases: {} /apis/coordination.k8s.io/v1/watch/namespaces/{namespace}/leases: {} /apis/coordination.k8s.io/v1/watch/namespaces/{namespace}/leases/{name}: {} @@ -41145,7 +42541,10 @@ paths: description: Unauthorized tags: - discovery - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/discovery.k8s.io/v1/: get: description: get available resources @@ -41168,7 +42567,10 @@ paths: description: Unauthorized tags: - discovery_v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/discovery.k8s.io/v1/endpointslices: get: description: list or watch objects of kind EndpointSlice @@ -41294,7 +42696,12 @@ paths: group: discovery.k8s.io kind: EndpointSlice version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml /apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices: delete: description: delete collection of EndpointSlice @@ -41448,7 +42855,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: list or watch objects of kind EndpointSlice operationId: listNamespacedEndpointSlice @@ -41579,7 +42989,12 @@ paths: group: discovery.k8s.io kind: EndpointSlice version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml post: description: create an EndpointSlice operationId: createNamespacedEndpointSlice @@ -41684,7 +43099,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices/{name}: delete: description: delete an EndpointSlice @@ -41788,7 +43206,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: read the specified EndpointSlice operationId: readNamespacedEndpointSlice @@ -41835,7 +43256,10 @@ paths: group: discovery.k8s.io kind: EndpointSlice version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update the specified EndpointSlice operationId: patchNamespacedEndpointSlice @@ -41943,7 +43367,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace the specified EndpointSlice operationId: replaceNamespacedEndpointSlice @@ -42042,7 +43469,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/discovery.k8s.io/v1/watch/endpointslices: {} /apis/discovery.k8s.io/v1/watch/namespaces/{namespace}/endpointslices: {} /apis/discovery.k8s.io/v1/watch/namespaces/{namespace}/endpointslices/{name}: {} @@ -42068,7 +43498,10 @@ paths: description: Unauthorized tags: - events - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/events.k8s.io/v1/: get: description: get available resources @@ -42091,7 +43524,10 @@ paths: description: Unauthorized tags: - events_v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/events.k8s.io/v1/events: get: description: list or watch objects of kind Event @@ -42217,7 +43653,12 @@ paths: group: events.k8s.io kind: Event version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml /apis/events.k8s.io/v1/namespaces/{namespace}/events: delete: description: delete collection of Event @@ -42371,7 +43812,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: list or watch objects of kind Event operationId: listNamespacedEvent @@ -42502,7 +43946,12 @@ paths: group: events.k8s.io kind: Event version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml post: description: create an Event operationId: createNamespacedEvent @@ -42607,7 +44056,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/events.k8s.io/v1/namespaces/{namespace}/events/{name}: delete: description: delete an Event @@ -42711,7 +44163,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: read the specified Event operationId: readNamespacedEvent @@ -42758,7 +44213,10 @@ paths: group: events.k8s.io kind: Event version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update the specified Event operationId: patchNamespacedEvent @@ -42866,7 +44324,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace the specified Event operationId: replaceNamespacedEvent @@ -42965,7 +44426,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/events.k8s.io/v1/watch/events: {} /apis/events.k8s.io/v1/watch/namespaces/{namespace}/events: {} /apis/events.k8s.io/v1/watch/namespaces/{namespace}/events/{name}: {} @@ -42991,7 +44455,10 @@ paths: description: Unauthorized tags: - flowcontrolApiserver - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/flowcontrol.apiserver.k8s.io/v1/: get: description: get available resources @@ -43014,7 +44481,10 @@ paths: description: Unauthorized tags: - flowcontrolApiserver_v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/flowcontrol.apiserver.k8s.io/v1/flowschemas: delete: description: delete collection of FlowSchema @@ -43162,7 +44632,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: list or watch objects of kind FlowSchema operationId: listFlowSchema @@ -43287,7 +44760,12 @@ paths: group: flowcontrol.apiserver.k8s.io kind: FlowSchema version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml post: description: create a FlowSchema operationId: createFlowSchema @@ -43386,7 +44864,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/flowcontrol.apiserver.k8s.io/v1/flowschemas/{name}: delete: description: delete a FlowSchema @@ -43484,7 +44965,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: read the specified FlowSchema operationId: readFlowSchema @@ -43525,7 +45009,10 @@ paths: group: flowcontrol.apiserver.k8s.io kind: FlowSchema version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update the specified FlowSchema operationId: patchFlowSchema @@ -43627,7 +45114,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace the specified FlowSchema operationId: replaceFlowSchema @@ -43720,7 +45210,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/flowcontrol.apiserver.k8s.io/v1/flowschemas/{name}/status: get: description: read status of the specified FlowSchema @@ -43762,7 +45255,10 @@ paths: group: flowcontrol.apiserver.k8s.io kind: FlowSchema version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update status of the specified FlowSchema operationId: patchFlowSchemaStatus @@ -43864,7 +45360,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace status of the specified FlowSchema operationId: replaceFlowSchemaStatus @@ -43957,7 +45456,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations: delete: description: delete collection of PriorityLevelConfiguration @@ -44105,7 +45607,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: list or watch objects of kind PriorityLevelConfiguration operationId: listPriorityLevelConfiguration @@ -44230,7 +45735,12 @@ paths: group: flowcontrol.apiserver.k8s.io kind: PriorityLevelConfiguration version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml post: description: create a PriorityLevelConfiguration operationId: createPriorityLevelConfiguration @@ -44329,7 +45839,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations/{name}: delete: description: delete a PriorityLevelConfiguration @@ -44427,7 +45940,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: read the specified PriorityLevelConfiguration operationId: readPriorityLevelConfiguration @@ -44468,7 +45984,10 @@ paths: group: flowcontrol.apiserver.k8s.io kind: PriorityLevelConfiguration version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update the specified PriorityLevelConfiguration operationId: patchPriorityLevelConfiguration @@ -44570,7 +46089,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace the specified PriorityLevelConfiguration operationId: replacePriorityLevelConfiguration @@ -44663,7 +46185,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations/{name}/status: get: description: read status of the specified PriorityLevelConfiguration @@ -44705,7 +46230,10 @@ paths: group: flowcontrol.apiserver.k8s.io kind: PriorityLevelConfiguration version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update status of the specified PriorityLevelConfiguration operationId: patchPriorityLevelConfigurationStatus @@ -44807,7 +46335,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace status of the specified PriorityLevelConfiguration operationId: replacePriorityLevelConfigurationStatus @@ -44900,7 +46431,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/flowcontrol.apiserver.k8s.io/v1/watch/flowschemas: {} /apis/flowcontrol.apiserver.k8s.io/v1/watch/flowschemas/{name}: {} /apis/flowcontrol.apiserver.k8s.io/v1/watch/prioritylevelconfigurations: {} @@ -44927,7 +46461,10 @@ paths: description: Unauthorized tags: - flowcontrolApiserver_v1beta3 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas: delete: description: delete collection of FlowSchema @@ -45075,7 +46612,10 @@ paths: version: v1beta3 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: list or watch objects of kind FlowSchema operationId: listFlowSchema @@ -45200,7 +46740,12 @@ paths: group: flowcontrol.apiserver.k8s.io kind: FlowSchema version: v1beta3 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml post: description: create a FlowSchema operationId: createFlowSchema @@ -45299,7 +46844,10 @@ paths: version: v1beta3 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas/{name}: delete: description: delete a FlowSchema @@ -45397,7 +46945,10 @@ paths: version: v1beta3 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: read the specified FlowSchema operationId: readFlowSchema @@ -45438,7 +46989,10 @@ paths: group: flowcontrol.apiserver.k8s.io kind: FlowSchema version: v1beta3 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update the specified FlowSchema operationId: patchFlowSchema @@ -45540,7 +47094,10 @@ paths: version: v1beta3 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace the specified FlowSchema operationId: replaceFlowSchema @@ -45633,7 +47190,10 @@ paths: version: v1beta3 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas/{name}/status: get: description: read status of the specified FlowSchema @@ -45675,7 +47235,10 @@ paths: group: flowcontrol.apiserver.k8s.io kind: FlowSchema version: v1beta3 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update status of the specified FlowSchema operationId: patchFlowSchemaStatus @@ -45777,7 +47340,10 @@ paths: version: v1beta3 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace status of the specified FlowSchema operationId: replaceFlowSchemaStatus @@ -45870,7 +47436,10 @@ paths: version: v1beta3 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/flowcontrol.apiserver.k8s.io/v1beta3/prioritylevelconfigurations: delete: description: delete collection of PriorityLevelConfiguration @@ -46018,7 +47587,10 @@ paths: version: v1beta3 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: list or watch objects of kind PriorityLevelConfiguration operationId: listPriorityLevelConfiguration @@ -46143,7 +47715,12 @@ paths: group: flowcontrol.apiserver.k8s.io kind: PriorityLevelConfiguration version: v1beta3 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml post: description: create a PriorityLevelConfiguration operationId: createPriorityLevelConfiguration @@ -46242,7 +47819,10 @@ paths: version: v1beta3 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/flowcontrol.apiserver.k8s.io/v1beta3/prioritylevelconfigurations/{name}: delete: description: delete a PriorityLevelConfiguration @@ -46340,7 +47920,10 @@ paths: version: v1beta3 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: read the specified PriorityLevelConfiguration operationId: readPriorityLevelConfiguration @@ -46381,7 +47964,10 @@ paths: group: flowcontrol.apiserver.k8s.io kind: PriorityLevelConfiguration version: v1beta3 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update the specified PriorityLevelConfiguration operationId: patchPriorityLevelConfiguration @@ -46483,7 +48069,10 @@ paths: version: v1beta3 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace the specified PriorityLevelConfiguration operationId: replacePriorityLevelConfiguration @@ -46576,7 +48165,10 @@ paths: version: v1beta3 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/flowcontrol.apiserver.k8s.io/v1beta3/prioritylevelconfigurations/{name}/status: get: description: read status of the specified PriorityLevelConfiguration @@ -46618,7 +48210,10 @@ paths: group: flowcontrol.apiserver.k8s.io kind: PriorityLevelConfiguration version: v1beta3 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update status of the specified PriorityLevelConfiguration operationId: patchPriorityLevelConfigurationStatus @@ -46720,7 +48315,10 @@ paths: version: v1beta3 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace status of the specified PriorityLevelConfiguration operationId: replacePriorityLevelConfigurationStatus @@ -46813,7 +48411,10 @@ paths: version: v1beta3 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/flowcontrol.apiserver.k8s.io/v1beta3/watch/flowschemas: {} /apis/flowcontrol.apiserver.k8s.io/v1beta3/watch/flowschemas/{name}: {} /apis/flowcontrol.apiserver.k8s.io/v1beta3/watch/prioritylevelconfigurations: {} @@ -46840,7 +48441,10 @@ paths: description: Unauthorized tags: - internalApiserver - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/internal.apiserver.k8s.io/v1alpha1/: get: description: get available resources @@ -46863,7 +48467,10 @@ paths: description: Unauthorized tags: - internalApiserver_v1alpha1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/internal.apiserver.k8s.io/v1alpha1/storageversions: delete: description: delete collection of StorageVersion @@ -47011,7 +48618,10 @@ paths: version: v1alpha1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: list or watch objects of kind StorageVersion operationId: listStorageVersion @@ -47136,7 +48746,12 @@ paths: group: internal.apiserver.k8s.io kind: StorageVersion version: v1alpha1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml post: description: create a StorageVersion operationId: createStorageVersion @@ -47235,7 +48850,10 @@ paths: version: v1alpha1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}: delete: description: delete a StorageVersion @@ -47333,7 +48951,10 @@ paths: version: v1alpha1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: read the specified StorageVersion operationId: readStorageVersion @@ -47374,7 +48995,10 @@ paths: group: internal.apiserver.k8s.io kind: StorageVersion version: v1alpha1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update the specified StorageVersion operationId: patchStorageVersion @@ -47476,7 +49100,10 @@ paths: version: v1alpha1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace the specified StorageVersion operationId: replaceStorageVersion @@ -47569,7 +49196,10 @@ paths: version: v1alpha1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}/status: get: description: read status of the specified StorageVersion @@ -47611,7 +49241,10 @@ paths: group: internal.apiserver.k8s.io kind: StorageVersion version: v1alpha1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update status of the specified StorageVersion operationId: patchStorageVersionStatus @@ -47713,7 +49346,10 @@ paths: version: v1alpha1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace status of the specified StorageVersion operationId: replaceStorageVersionStatus @@ -47806,7 +49442,10 @@ paths: version: v1alpha1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/internal.apiserver.k8s.io/v1alpha1/watch/storageversions: {} /apis/internal.apiserver.k8s.io/v1alpha1/watch/storageversions/{name}: {} /apis/networking.k8s.io/: @@ -47831,7 +49470,10 @@ paths: description: Unauthorized tags: - networking - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/networking.k8s.io/v1/: get: description: get available resources @@ -47854,7 +49496,10 @@ paths: description: Unauthorized tags: - networking_v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/networking.k8s.io/v1/ingressclasses: delete: description: delete collection of IngressClass @@ -48002,7 +49647,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: list or watch objects of kind IngressClass operationId: listIngressClass @@ -48127,7 +49775,12 @@ paths: group: networking.k8s.io kind: IngressClass version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml post: description: create an IngressClass operationId: createIngressClass @@ -48226,7 +49879,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/networking.k8s.io/v1/ingressclasses/{name}: delete: description: delete an IngressClass @@ -48324,7 +49980,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: read the specified IngressClass operationId: readIngressClass @@ -48365,7 +50024,10 @@ paths: group: networking.k8s.io kind: IngressClass version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update the specified IngressClass operationId: patchIngressClass @@ -48467,7 +50129,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace the specified IngressClass operationId: replaceIngressClass @@ -48560,7 +50225,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/networking.k8s.io/v1/ingresses: get: description: list or watch objects of kind Ingress @@ -48686,7 +50354,12 @@ paths: group: networking.k8s.io kind: Ingress version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses: delete: description: delete collection of Ingress @@ -48840,7 +50513,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: list or watch objects of kind Ingress operationId: listNamespacedIngress @@ -48971,7 +50647,12 @@ paths: group: networking.k8s.io kind: Ingress version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml post: description: create an Ingress operationId: createNamespacedIngress @@ -49076,7 +50757,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}: delete: description: delete an Ingress @@ -49180,7 +50864,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: read the specified Ingress operationId: readNamespacedIngress @@ -49227,7 +50914,10 @@ paths: group: networking.k8s.io kind: Ingress version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update the specified Ingress operationId: patchNamespacedIngress @@ -49335,7 +51025,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace the specified Ingress operationId: replaceNamespacedIngress @@ -49434,7 +51127,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}/status: get: description: read status of the specified Ingress @@ -49482,7 +51178,10 @@ paths: group: networking.k8s.io kind: Ingress version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update status of the specified Ingress operationId: patchNamespacedIngressStatus @@ -49590,7 +51289,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace status of the specified Ingress operationId: replaceNamespacedIngressStatus @@ -49689,7 +51391,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies: delete: description: delete collection of NetworkPolicy @@ -49843,7 +51548,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: list or watch objects of kind NetworkPolicy operationId: listNamespacedNetworkPolicy @@ -49974,7 +51682,12 @@ paths: group: networking.k8s.io kind: NetworkPolicy version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml post: description: create a NetworkPolicy operationId: createNamespacedNetworkPolicy @@ -50079,7 +51792,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}: delete: description: delete a NetworkPolicy @@ -50183,7 +51899,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: read the specified NetworkPolicy operationId: readNamespacedNetworkPolicy @@ -50230,7 +51949,10 @@ paths: group: networking.k8s.io kind: NetworkPolicy version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update the specified NetworkPolicy operationId: patchNamespacedNetworkPolicy @@ -50338,7 +52060,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace the specified NetworkPolicy operationId: replaceNamespacedNetworkPolicy @@ -50437,7 +52162,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/networking.k8s.io/v1/networkpolicies: get: description: list or watch objects of kind NetworkPolicy @@ -50563,7 +52291,12 @@ paths: group: networking.k8s.io kind: NetworkPolicy version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml /apis/networking.k8s.io/v1/watch/ingressclasses: {} /apis/networking.k8s.io/v1/watch/ingressclasses/{name}: {} /apis/networking.k8s.io/v1/watch/ingresses: {} @@ -50594,7 +52327,10 @@ paths: description: Unauthorized tags: - networking_v1alpha1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/networking.k8s.io/v1alpha1/ipaddresses: delete: description: delete collection of IPAddress @@ -50742,7 +52478,10 @@ paths: version: v1alpha1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: list or watch objects of kind IPAddress operationId: listIPAddress @@ -50867,7 +52606,12 @@ paths: group: networking.k8s.io kind: IPAddress version: v1alpha1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml post: description: create an IPAddress operationId: createIPAddress @@ -50966,7 +52710,10 @@ paths: version: v1alpha1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/networking.k8s.io/v1alpha1/ipaddresses/{name}: delete: description: delete an IPAddress @@ -51064,7 +52811,10 @@ paths: version: v1alpha1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: read the specified IPAddress operationId: readIPAddress @@ -51105,7 +52855,10 @@ paths: group: networking.k8s.io kind: IPAddress version: v1alpha1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update the specified IPAddress operationId: patchIPAddress @@ -51207,7 +52960,10 @@ paths: version: v1alpha1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace the specified IPAddress operationId: replaceIPAddress @@ -51300,7 +53056,10 @@ paths: version: v1alpha1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/networking.k8s.io/v1alpha1/servicecidrs: delete: description: delete collection of ServiceCIDR @@ -51448,7 +53207,10 @@ paths: version: v1alpha1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: list or watch objects of kind ServiceCIDR operationId: listServiceCIDR @@ -51573,7 +53335,12 @@ paths: group: networking.k8s.io kind: ServiceCIDR version: v1alpha1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml post: description: create a ServiceCIDR operationId: createServiceCIDR @@ -51672,7 +53439,10 @@ paths: version: v1alpha1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/networking.k8s.io/v1alpha1/servicecidrs/{name}: delete: description: delete a ServiceCIDR @@ -51770,7 +53540,10 @@ paths: version: v1alpha1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: read the specified ServiceCIDR operationId: readServiceCIDR @@ -51811,7 +53584,10 @@ paths: group: networking.k8s.io kind: ServiceCIDR version: v1alpha1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update the specified ServiceCIDR operationId: patchServiceCIDR @@ -51913,7 +53689,10 @@ paths: version: v1alpha1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace the specified ServiceCIDR operationId: replaceServiceCIDR @@ -52006,7 +53785,10 @@ paths: version: v1alpha1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/networking.k8s.io/v1alpha1/servicecidrs/{name}/status: get: description: read status of the specified ServiceCIDR @@ -52048,7 +53830,10 @@ paths: group: networking.k8s.io kind: ServiceCIDR version: v1alpha1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update status of the specified ServiceCIDR operationId: patchServiceCIDRStatus @@ -52150,7 +53935,10 @@ paths: version: v1alpha1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace status of the specified ServiceCIDR operationId: replaceServiceCIDRStatus @@ -52243,7 +54031,10 @@ paths: version: v1alpha1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/networking.k8s.io/v1alpha1/watch/ipaddresses: {} /apis/networking.k8s.io/v1alpha1/watch/ipaddresses/{name}: {} /apis/networking.k8s.io/v1alpha1/watch/servicecidrs: {} @@ -52270,7 +54061,10 @@ paths: description: Unauthorized tags: - node - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/node.k8s.io/v1/: get: description: get available resources @@ -52293,7 +54087,10 @@ paths: description: Unauthorized tags: - node_v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/node.k8s.io/v1/runtimeclasses: delete: description: delete collection of RuntimeClass @@ -52441,7 +54238,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: list or watch objects of kind RuntimeClass operationId: listRuntimeClass @@ -52566,7 +54366,12 @@ paths: group: node.k8s.io kind: RuntimeClass version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml post: description: create a RuntimeClass operationId: createRuntimeClass @@ -52665,7 +54470,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/node.k8s.io/v1/runtimeclasses/{name}: delete: description: delete a RuntimeClass @@ -52763,7 +54571,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: read the specified RuntimeClass operationId: readRuntimeClass @@ -52804,7 +54615,10 @@ paths: group: node.k8s.io kind: RuntimeClass version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update the specified RuntimeClass operationId: patchRuntimeClass @@ -52906,7 +54720,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace the specified RuntimeClass operationId: replaceRuntimeClass @@ -52999,7 +54816,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/node.k8s.io/v1/watch/runtimeclasses: {} /apis/node.k8s.io/v1/watch/runtimeclasses/{name}: {} /apis/policy/: @@ -53024,7 +54844,10 @@ paths: description: Unauthorized tags: - policy - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/policy/v1/: get: description: get available resources @@ -53047,7 +54870,10 @@ paths: description: Unauthorized tags: - policy_v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets: delete: description: delete collection of PodDisruptionBudget @@ -53201,7 +55027,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: list or watch objects of kind PodDisruptionBudget operationId: listNamespacedPodDisruptionBudget @@ -53332,7 +55161,12 @@ paths: group: policy kind: PodDisruptionBudget version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml post: description: create a PodDisruptionBudget operationId: createNamespacedPodDisruptionBudget @@ -53437,7 +55271,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}: delete: description: delete a PodDisruptionBudget @@ -53541,7 +55378,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: read the specified PodDisruptionBudget operationId: readNamespacedPodDisruptionBudget @@ -53588,7 +55428,10 @@ paths: group: policy kind: PodDisruptionBudget version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update the specified PodDisruptionBudget operationId: patchNamespacedPodDisruptionBudget @@ -53696,7 +55539,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace the specified PodDisruptionBudget operationId: replaceNamespacedPodDisruptionBudget @@ -53795,7 +55641,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}/status: get: description: read status of the specified PodDisruptionBudget @@ -53843,7 +55692,10 @@ paths: group: policy kind: PodDisruptionBudget version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update status of the specified PodDisruptionBudget operationId: patchNamespacedPodDisruptionBudgetStatus @@ -53951,7 +55803,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace status of the specified PodDisruptionBudget operationId: replaceNamespacedPodDisruptionBudgetStatus @@ -54050,7 +55905,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/policy/v1/poddisruptionbudgets: get: description: list or watch objects of kind PodDisruptionBudget @@ -54176,7 +56034,12 @@ paths: group: policy kind: PodDisruptionBudget version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml /apis/policy/v1/watch/namespaces/{namespace}/poddisruptionbudgets: {} /apis/policy/v1/watch/namespaces/{namespace}/poddisruptionbudgets/{name}: {} /apis/policy/v1/watch/poddisruptionbudgets: {} @@ -54202,7 +56065,10 @@ paths: description: Unauthorized tags: - rbacAuthorization - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/rbac.authorization.k8s.io/v1/: get: description: get available resources @@ -54225,7 +56091,10 @@ paths: description: Unauthorized tags: - rbacAuthorization_v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/rbac.authorization.k8s.io/v1/clusterrolebindings: delete: description: delete collection of ClusterRoleBinding @@ -54373,7 +56242,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: list or watch objects of kind ClusterRoleBinding operationId: listClusterRoleBinding @@ -54498,7 +56370,12 @@ paths: group: rbac.authorization.k8s.io kind: ClusterRoleBinding version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml post: description: create a ClusterRoleBinding operationId: createClusterRoleBinding @@ -54597,7 +56474,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}: delete: description: delete a ClusterRoleBinding @@ -54695,7 +56575,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: read the specified ClusterRoleBinding operationId: readClusterRoleBinding @@ -54736,7 +56619,10 @@ paths: group: rbac.authorization.k8s.io kind: ClusterRoleBinding version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update the specified ClusterRoleBinding operationId: patchClusterRoleBinding @@ -54838,7 +56724,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace the specified ClusterRoleBinding operationId: replaceClusterRoleBinding @@ -54931,7 +56820,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/rbac.authorization.k8s.io/v1/clusterroles: delete: description: delete collection of ClusterRole @@ -55079,7 +56971,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: list or watch objects of kind ClusterRole operationId: listClusterRole @@ -55204,7 +57099,12 @@ paths: group: rbac.authorization.k8s.io kind: ClusterRole version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml post: description: create a ClusterRole operationId: createClusterRole @@ -55303,7 +57203,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/rbac.authorization.k8s.io/v1/clusterroles/{name}: delete: description: delete a ClusterRole @@ -55401,7 +57304,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: read the specified ClusterRole operationId: readClusterRole @@ -55442,7 +57348,10 @@ paths: group: rbac.authorization.k8s.io kind: ClusterRole version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update the specified ClusterRole operationId: patchClusterRole @@ -55544,7 +57453,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace the specified ClusterRole operationId: replaceClusterRole @@ -55637,7 +57549,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings: delete: description: delete collection of RoleBinding @@ -55791,7 +57706,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: list or watch objects of kind RoleBinding operationId: listNamespacedRoleBinding @@ -55922,7 +57840,12 @@ paths: group: rbac.authorization.k8s.io kind: RoleBinding version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml post: description: create a RoleBinding operationId: createNamespacedRoleBinding @@ -56027,7 +57950,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name}: delete: description: delete a RoleBinding @@ -56131,7 +58057,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: read the specified RoleBinding operationId: readNamespacedRoleBinding @@ -56178,7 +58107,10 @@ paths: group: rbac.authorization.k8s.io kind: RoleBinding version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update the specified RoleBinding operationId: patchNamespacedRoleBinding @@ -56286,7 +58218,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace the specified RoleBinding operationId: replaceNamespacedRoleBinding @@ -56385,7 +58320,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles: delete: description: delete collection of Role @@ -56539,7 +58477,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: list or watch objects of kind Role operationId: listNamespacedRole @@ -56670,7 +58611,12 @@ paths: group: rbac.authorization.k8s.io kind: Role version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml post: description: create a Role operationId: createNamespacedRole @@ -56775,7 +58721,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name}: delete: description: delete a Role @@ -56879,7 +58828,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: read the specified Role operationId: readNamespacedRole @@ -56926,7 +58878,10 @@ paths: group: rbac.authorization.k8s.io kind: Role version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update the specified Role operationId: patchNamespacedRole @@ -57034,7 +58989,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace the specified Role operationId: replaceNamespacedRole @@ -57133,7 +59091,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/rbac.authorization.k8s.io/v1/rolebindings: get: description: list or watch objects of kind RoleBinding @@ -57259,7 +59220,12 @@ paths: group: rbac.authorization.k8s.io kind: RoleBinding version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml /apis/rbac.authorization.k8s.io/v1/roles: get: description: list or watch objects of kind Role @@ -57385,7 +59351,12 @@ paths: group: rbac.authorization.k8s.io kind: Role version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml /apis/rbac.authorization.k8s.io/v1/watch/clusterrolebindings: {} /apis/rbac.authorization.k8s.io/v1/watch/clusterrolebindings/{name}: {} /apis/rbac.authorization.k8s.io/v1/watch/clusterroles: {} @@ -57418,7 +59389,10 @@ paths: description: Unauthorized tags: - resource - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/resource.k8s.io/v1alpha2/: get: description: get available resources @@ -57441,7 +59415,10 @@ paths: description: Unauthorized tags: - resource_v1alpha2 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/podschedulingcontexts: delete: description: delete collection of PodSchedulingContext @@ -57595,7 +59572,10 @@ paths: version: v1alpha2 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: list or watch objects of kind PodSchedulingContext operationId: listNamespacedPodSchedulingContext @@ -57726,7 +59706,12 @@ paths: group: resource.k8s.io kind: PodSchedulingContext version: v1alpha2 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml post: description: create a PodSchedulingContext operationId: createNamespacedPodSchedulingContext @@ -57831,7 +59816,10 @@ paths: version: v1alpha2 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/podschedulingcontexts/{name}: delete: description: delete a PodSchedulingContext @@ -57935,7 +59923,10 @@ paths: version: v1alpha2 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: read the specified PodSchedulingContext operationId: readNamespacedPodSchedulingContext @@ -57982,7 +59973,10 @@ paths: group: resource.k8s.io kind: PodSchedulingContext version: v1alpha2 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update the specified PodSchedulingContext operationId: patchNamespacedPodSchedulingContext @@ -58090,7 +60084,10 @@ paths: version: v1alpha2 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace the specified PodSchedulingContext operationId: replaceNamespacedPodSchedulingContext @@ -58189,7 +60186,10 @@ paths: version: v1alpha2 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/podschedulingcontexts/{name}/status: get: description: read status of the specified PodSchedulingContext @@ -58237,7 +60237,10 @@ paths: group: resource.k8s.io kind: PodSchedulingContext version: v1alpha2 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update status of the specified PodSchedulingContext operationId: patchNamespacedPodSchedulingContextStatus @@ -58345,7 +60348,10 @@ paths: version: v1alpha2 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace status of the specified PodSchedulingContext operationId: replaceNamespacedPodSchedulingContextStatus @@ -58444,7 +60450,10 @@ paths: version: v1alpha2 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaimparameters: delete: description: delete collection of ResourceClaimParameters @@ -58598,7 +60607,10 @@ paths: version: v1alpha2 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: list or watch objects of kind ResourceClaimParameters operationId: listNamespacedResourceClaimParameters @@ -58729,7 +60741,12 @@ paths: group: resource.k8s.io kind: ResourceClaimParameters version: v1alpha2 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml post: description: create ResourceClaimParameters operationId: createNamespacedResourceClaimParameters @@ -58834,7 +60851,10 @@ paths: version: v1alpha2 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaimparameters/{name}: delete: description: delete ResourceClaimParameters @@ -58938,7 +60958,10 @@ paths: version: v1alpha2 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: read the specified ResourceClaimParameters operationId: readNamespacedResourceClaimParameters @@ -58985,7 +61008,10 @@ paths: group: resource.k8s.io kind: ResourceClaimParameters version: v1alpha2 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update the specified ResourceClaimParameters operationId: patchNamespacedResourceClaimParameters @@ -59093,7 +61119,10 @@ paths: version: v1alpha2 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace the specified ResourceClaimParameters operationId: replaceNamespacedResourceClaimParameters @@ -59192,7 +61221,10 @@ paths: version: v1alpha2 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaims: delete: description: delete collection of ResourceClaim @@ -59346,7 +61378,10 @@ paths: version: v1alpha2 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: list or watch objects of kind ResourceClaim operationId: listNamespacedResourceClaim @@ -59477,7 +61512,12 @@ paths: group: resource.k8s.io kind: ResourceClaim version: v1alpha2 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml post: description: create a ResourceClaim operationId: createNamespacedResourceClaim @@ -59582,7 +61622,10 @@ paths: version: v1alpha2 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaims/{name}: delete: description: delete a ResourceClaim @@ -59686,7 +61729,10 @@ paths: version: v1alpha2 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: read the specified ResourceClaim operationId: readNamespacedResourceClaim @@ -59733,7 +61779,10 @@ paths: group: resource.k8s.io kind: ResourceClaim version: v1alpha2 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update the specified ResourceClaim operationId: patchNamespacedResourceClaim @@ -59841,7 +61890,10 @@ paths: version: v1alpha2 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace the specified ResourceClaim operationId: replaceNamespacedResourceClaim @@ -59940,7 +61992,10 @@ paths: version: v1alpha2 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaims/{name}/status: get: description: read status of the specified ResourceClaim @@ -59988,7 +62043,10 @@ paths: group: resource.k8s.io kind: ResourceClaim version: v1alpha2 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update status of the specified ResourceClaim operationId: patchNamespacedResourceClaimStatus @@ -60096,7 +62154,10 @@ paths: version: v1alpha2 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace status of the specified ResourceClaim operationId: replaceNamespacedResourceClaimStatus @@ -60195,7 +62256,10 @@ paths: version: v1alpha2 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaimtemplates: delete: description: delete collection of ResourceClaimTemplate @@ -60349,7 +62413,10 @@ paths: version: v1alpha2 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: list or watch objects of kind ResourceClaimTemplate operationId: listNamespacedResourceClaimTemplate @@ -60480,7 +62547,12 @@ paths: group: resource.k8s.io kind: ResourceClaimTemplate version: v1alpha2 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml post: description: create a ResourceClaimTemplate operationId: createNamespacedResourceClaimTemplate @@ -60585,7 +62657,10 @@ paths: version: v1alpha2 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaimtemplates/{name}: delete: description: delete a ResourceClaimTemplate @@ -60689,7 +62764,10 @@ paths: version: v1alpha2 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: read the specified ResourceClaimTemplate operationId: readNamespacedResourceClaimTemplate @@ -60736,7 +62814,10 @@ paths: group: resource.k8s.io kind: ResourceClaimTemplate version: v1alpha2 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update the specified ResourceClaimTemplate operationId: patchNamespacedResourceClaimTemplate @@ -60844,7 +62925,10 @@ paths: version: v1alpha2 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace the specified ResourceClaimTemplate operationId: replaceNamespacedResourceClaimTemplate @@ -60943,7 +63027,10 @@ paths: version: v1alpha2 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclassparameters: delete: description: delete collection of ResourceClassParameters @@ -61097,7 +63184,10 @@ paths: version: v1alpha2 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: list or watch objects of kind ResourceClassParameters operationId: listNamespacedResourceClassParameters @@ -61228,7 +63318,12 @@ paths: group: resource.k8s.io kind: ResourceClassParameters version: v1alpha2 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml post: description: create ResourceClassParameters operationId: createNamespacedResourceClassParameters @@ -61333,7 +63428,10 @@ paths: version: v1alpha2 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclassparameters/{name}: delete: description: delete ResourceClassParameters @@ -61437,7 +63535,10 @@ paths: version: v1alpha2 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: read the specified ResourceClassParameters operationId: readNamespacedResourceClassParameters @@ -61484,7 +63585,10 @@ paths: group: resource.k8s.io kind: ResourceClassParameters version: v1alpha2 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update the specified ResourceClassParameters operationId: patchNamespacedResourceClassParameters @@ -61592,7 +63696,10 @@ paths: version: v1alpha2 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace the specified ResourceClassParameters operationId: replaceNamespacedResourceClassParameters @@ -61691,7 +63798,10 @@ paths: version: v1alpha2 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/resource.k8s.io/v1alpha2/podschedulingcontexts: get: description: list or watch objects of kind PodSchedulingContext @@ -61817,7 +63927,12 @@ paths: group: resource.k8s.io kind: PodSchedulingContext version: v1alpha2 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml /apis/resource.k8s.io/v1alpha2/resourceclaimparameters: get: description: list or watch objects of kind ResourceClaimParameters @@ -61943,7 +64058,12 @@ paths: group: resource.k8s.io kind: ResourceClaimParameters version: v1alpha2 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml /apis/resource.k8s.io/v1alpha2/resourceclaims: get: description: list or watch objects of kind ResourceClaim @@ -62069,7 +64189,12 @@ paths: group: resource.k8s.io kind: ResourceClaim version: v1alpha2 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml /apis/resource.k8s.io/v1alpha2/resourceclaimtemplates: get: description: list or watch objects of kind ResourceClaimTemplate @@ -62195,7 +64320,12 @@ paths: group: resource.k8s.io kind: ResourceClaimTemplate version: v1alpha2 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml /apis/resource.k8s.io/v1alpha2/resourceclasses: delete: description: delete collection of ResourceClass @@ -62343,7 +64473,10 @@ paths: version: v1alpha2 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: list or watch objects of kind ResourceClass operationId: listResourceClass @@ -62468,7 +64601,12 @@ paths: group: resource.k8s.io kind: ResourceClass version: v1alpha2 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml post: description: create a ResourceClass operationId: createResourceClass @@ -62567,7 +64705,10 @@ paths: version: v1alpha2 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/resource.k8s.io/v1alpha2/resourceclasses/{name}: delete: description: delete a ResourceClass @@ -62665,7 +64806,10 @@ paths: version: v1alpha2 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: read the specified ResourceClass operationId: readResourceClass @@ -62706,7 +64850,10 @@ paths: group: resource.k8s.io kind: ResourceClass version: v1alpha2 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update the specified ResourceClass operationId: patchResourceClass @@ -62808,7 +64955,10 @@ paths: version: v1alpha2 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace the specified ResourceClass operationId: replaceResourceClass @@ -62901,7 +65051,10 @@ paths: version: v1alpha2 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/resource.k8s.io/v1alpha2/resourceclassparameters: get: description: list or watch objects of kind ResourceClassParameters @@ -63027,7 +65180,12 @@ paths: group: resource.k8s.io kind: ResourceClassParameters version: v1alpha2 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml /apis/resource.k8s.io/v1alpha2/resourceslices: delete: description: delete collection of ResourceSlice @@ -63175,7 +65333,10 @@ paths: version: v1alpha2 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: list or watch objects of kind ResourceSlice operationId: listResourceSlice @@ -63300,7 +65461,12 @@ paths: group: resource.k8s.io kind: ResourceSlice version: v1alpha2 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml post: description: create a ResourceSlice operationId: createResourceSlice @@ -63399,7 +65565,10 @@ paths: version: v1alpha2 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/resource.k8s.io/v1alpha2/resourceslices/{name}: delete: description: delete a ResourceSlice @@ -63497,7 +65666,10 @@ paths: version: v1alpha2 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: read the specified ResourceSlice operationId: readResourceSlice @@ -63538,7 +65710,10 @@ paths: group: resource.k8s.io kind: ResourceSlice version: v1alpha2 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update the specified ResourceSlice operationId: patchResourceSlice @@ -63640,7 +65815,10 @@ paths: version: v1alpha2 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace the specified ResourceSlice operationId: replaceResourceSlice @@ -63733,7 +65911,10 @@ paths: version: v1alpha2 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/resource.k8s.io/v1alpha2/watch/namespaces/{namespace}/podschedulingcontexts: {} /apis/resource.k8s.io/v1alpha2/watch/namespaces/{namespace}/podschedulingcontexts/{name}: {} /apis/resource.k8s.io/v1alpha2/watch/namespaces/{namespace}/resourceclaimparameters: {} @@ -63775,7 +65956,10 @@ paths: description: Unauthorized tags: - scheduling - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/scheduling.k8s.io/v1/: get: description: get available resources @@ -63798,7 +65982,10 @@ paths: description: Unauthorized tags: - scheduling_v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/scheduling.k8s.io/v1/priorityclasses: delete: description: delete collection of PriorityClass @@ -63946,7 +66133,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: list or watch objects of kind PriorityClass operationId: listPriorityClass @@ -64071,7 +66261,12 @@ paths: group: scheduling.k8s.io kind: PriorityClass version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml post: description: create a PriorityClass operationId: createPriorityClass @@ -64170,7 +66365,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/scheduling.k8s.io/v1/priorityclasses/{name}: delete: description: delete a PriorityClass @@ -64268,7 +66466,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: read the specified PriorityClass operationId: readPriorityClass @@ -64309,7 +66510,10 @@ paths: group: scheduling.k8s.io kind: PriorityClass version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update the specified PriorityClass operationId: patchPriorityClass @@ -64411,7 +66615,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace the specified PriorityClass operationId: replacePriorityClass @@ -64504,7 +66711,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/scheduling.k8s.io/v1/watch/priorityclasses: {} /apis/scheduling.k8s.io/v1/watch/priorityclasses/{name}: {} /apis/storage.k8s.io/: @@ -64529,7 +66739,10 @@ paths: description: Unauthorized tags: - storage - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/storage.k8s.io/v1/: get: description: get available resources @@ -64552,7 +66765,10 @@ paths: description: Unauthorized tags: - storage_v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/storage.k8s.io/v1/csidrivers: delete: description: delete collection of CSIDriver @@ -64700,7 +66916,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: list or watch objects of kind CSIDriver operationId: listCSIDriver @@ -64825,7 +67044,12 @@ paths: group: storage.k8s.io kind: CSIDriver version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml post: description: create a CSIDriver operationId: createCSIDriver @@ -64924,7 +67148,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/storage.k8s.io/v1/csidrivers/{name}: delete: description: delete a CSIDriver @@ -65022,7 +67249,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: read the specified CSIDriver operationId: readCSIDriver @@ -65063,7 +67293,10 @@ paths: group: storage.k8s.io kind: CSIDriver version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update the specified CSIDriver operationId: patchCSIDriver @@ -65165,7 +67398,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace the specified CSIDriver operationId: replaceCSIDriver @@ -65258,7 +67494,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/storage.k8s.io/v1/csinodes: delete: description: delete collection of CSINode @@ -65406,7 +67645,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: list or watch objects of kind CSINode operationId: listCSINode @@ -65531,7 +67773,12 @@ paths: group: storage.k8s.io kind: CSINode version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml post: description: create a CSINode operationId: createCSINode @@ -65630,7 +67877,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/storage.k8s.io/v1/csinodes/{name}: delete: description: delete a CSINode @@ -65728,7 +67978,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: read the specified CSINode operationId: readCSINode @@ -65769,7 +68022,10 @@ paths: group: storage.k8s.io kind: CSINode version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update the specified CSINode operationId: patchCSINode @@ -65871,7 +68127,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace the specified CSINode operationId: replaceCSINode @@ -65964,7 +68223,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/storage.k8s.io/v1/csistoragecapacities: get: description: list or watch objects of kind CSIStorageCapacity @@ -66090,7 +68352,12 @@ paths: group: storage.k8s.io kind: CSIStorageCapacity version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml /apis/storage.k8s.io/v1/namespaces/{namespace}/csistoragecapacities: delete: description: delete collection of CSIStorageCapacity @@ -66244,7 +68511,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: list or watch objects of kind CSIStorageCapacity operationId: listNamespacedCSIStorageCapacity @@ -66375,7 +68645,12 @@ paths: group: storage.k8s.io kind: CSIStorageCapacity version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml post: description: create a CSIStorageCapacity operationId: createNamespacedCSIStorageCapacity @@ -66480,7 +68755,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/storage.k8s.io/v1/namespaces/{namespace}/csistoragecapacities/{name}: delete: description: delete a CSIStorageCapacity @@ -66584,7 +68862,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: read the specified CSIStorageCapacity operationId: readNamespacedCSIStorageCapacity @@ -66631,7 +68912,10 @@ paths: group: storage.k8s.io kind: CSIStorageCapacity version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update the specified CSIStorageCapacity operationId: patchNamespacedCSIStorageCapacity @@ -66739,7 +69023,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace the specified CSIStorageCapacity operationId: replaceNamespacedCSIStorageCapacity @@ -66838,7 +69125,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/storage.k8s.io/v1/storageclasses: delete: description: delete collection of StorageClass @@ -66986,7 +69276,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: list or watch objects of kind StorageClass operationId: listStorageClass @@ -67111,7 +69404,12 @@ paths: group: storage.k8s.io kind: StorageClass version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml post: description: create a StorageClass operationId: createStorageClass @@ -67210,7 +69508,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/storage.k8s.io/v1/storageclasses/{name}: delete: description: delete a StorageClass @@ -67308,7 +69609,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: read the specified StorageClass operationId: readStorageClass @@ -67349,7 +69653,10 @@ paths: group: storage.k8s.io kind: StorageClass version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update the specified StorageClass operationId: patchStorageClass @@ -67451,7 +69758,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace the specified StorageClass operationId: replaceStorageClass @@ -67544,7 +69854,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/storage.k8s.io/v1/volumeattachments: delete: description: delete collection of VolumeAttachment @@ -67692,7 +70005,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: list or watch objects of kind VolumeAttachment operationId: listVolumeAttachment @@ -67817,7 +70133,12 @@ paths: group: storage.k8s.io kind: VolumeAttachment version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml post: description: create a VolumeAttachment operationId: createVolumeAttachment @@ -67916,7 +70237,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/storage.k8s.io/v1/volumeattachments/{name}: delete: description: delete a VolumeAttachment @@ -68014,7 +70338,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: read the specified VolumeAttachment operationId: readVolumeAttachment @@ -68055,7 +70382,10 @@ paths: group: storage.k8s.io kind: VolumeAttachment version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update the specified VolumeAttachment operationId: patchVolumeAttachment @@ -68157,7 +70487,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace the specified VolumeAttachment operationId: replaceVolumeAttachment @@ -68250,7 +70583,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/storage.k8s.io/v1/volumeattachments/{name}/status: get: description: read status of the specified VolumeAttachment @@ -68292,7 +70628,10 @@ paths: group: storage.k8s.io kind: VolumeAttachment version: v1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update status of the specified VolumeAttachment operationId: patchVolumeAttachmentStatus @@ -68394,7 +70733,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace status of the specified VolumeAttachment operationId: replaceVolumeAttachmentStatus @@ -68487,7 +70829,10 @@ paths: version: v1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/storage.k8s.io/v1/watch/csidrivers: {} /apis/storage.k8s.io/v1/watch/csidrivers/{name}: {} /apis/storage.k8s.io/v1/watch/csinodes: {} @@ -68521,7 +70866,10 @@ paths: description: Unauthorized tags: - storage_v1alpha1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/storage.k8s.io/v1alpha1/volumeattributesclasses: delete: description: delete collection of VolumeAttributesClass @@ -68669,7 +71017,10 @@ paths: version: v1alpha1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: list or watch objects of kind VolumeAttributesClass operationId: listVolumeAttributesClass @@ -68794,7 +71145,12 @@ paths: group: storage.k8s.io kind: VolumeAttributesClass version: v1alpha1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml post: description: create a VolumeAttributesClass operationId: createVolumeAttributesClass @@ -68893,7 +71249,10 @@ paths: version: v1alpha1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/storage.k8s.io/v1alpha1/volumeattributesclasses/{name}: delete: description: delete a VolumeAttributesClass @@ -68991,7 +71350,10 @@ paths: version: v1alpha1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: read the specified VolumeAttributesClass operationId: readVolumeAttributesClass @@ -69032,7 +71394,10 @@ paths: group: storage.k8s.io kind: VolumeAttributesClass version: v1alpha1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update the specified VolumeAttributesClass operationId: patchVolumeAttributesClass @@ -69134,7 +71499,10 @@ paths: version: v1alpha1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace the specified VolumeAttributesClass operationId: replaceVolumeAttributesClass @@ -69227,7 +71595,10 @@ paths: version: v1alpha1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/storage.k8s.io/v1alpha1/watch/volumeattributesclasses: {} /apis/storage.k8s.io/v1alpha1/watch/volumeattributesclasses/{name}: {} /apis/storagemigration.k8s.io/: @@ -69252,7 +71623,10 @@ paths: description: Unauthorized tags: - storagemigration - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/storagemigration.k8s.io/v1alpha1/: get: description: get available resources @@ -69275,7 +71649,10 @@ paths: description: Unauthorized tags: - storagemigration_v1alpha1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations: delete: description: delete collection of StorageVersionMigration @@ -69423,7 +71800,10 @@ paths: version: v1alpha1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: list or watch objects of kind StorageVersionMigration operationId: listStorageVersionMigration @@ -69548,7 +71928,12 @@ paths: group: storagemigration.k8s.io kind: StorageVersionMigration version: v1alpha1 - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch + - application/vnd.kubernetes.protobuf + - application/vnd.kubernetes.protobuf;stream=watch + - application/yaml post: description: create a StorageVersionMigration operationId: createStorageVersionMigration @@ -69647,7 +72032,10 @@ paths: version: v1alpha1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations/{name}: delete: description: delete a StorageVersionMigration @@ -69745,7 +72133,10 @@ paths: version: v1alpha1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml get: description: read the specified StorageVersionMigration operationId: readStorageVersionMigration @@ -69786,7 +72177,10 @@ paths: group: storagemigration.k8s.io kind: StorageVersionMigration version: v1alpha1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update the specified StorageVersionMigration operationId: patchStorageVersionMigration @@ -69888,7 +72282,10 @@ paths: version: v1alpha1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace the specified StorageVersionMigration operationId: replaceStorageVersionMigration @@ -69981,7 +72378,10 @@ paths: version: v1alpha1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations/{name}/status: get: description: read status of the specified StorageVersionMigration @@ -70023,7 +72423,10 @@ paths: group: storagemigration.k8s.io kind: StorageVersionMigration version: v1alpha1 - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update status of the specified StorageVersionMigration operationId: patchStorageVersionMigrationStatus @@ -70125,7 +72528,10 @@ paths: version: v1alpha1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace status of the specified StorageVersionMigration operationId: replaceStorageVersionMigrationStatus @@ -70218,7 +72624,10 @@ paths: version: v1alpha1 x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/storagemigration.k8s.io/v1alpha1/watch/storageversionmigrations: {} /apis/storagemigration.k8s.io/v1alpha1/watch/storageversionmigrations/{name}: {} /logs/: @@ -70230,7 +72639,8 @@ paths: description: Unauthorized tags: - logs - x-accepts: application/json + x-accepts: + - application/json /logs/{logpath}: get: operationId: logFileHandler @@ -70247,7 +72657,8 @@ paths: description: Unauthorized tags: - logs - x-accepts: application/json + x-accepts: + - application/json /version/: get: description: get the code version @@ -70264,7 +72675,8 @@ paths: description: Unauthorized tags: - version - x-accepts: application/json + x-accepts: + - application/json /apis/{group}/{version}: get: description: get available resources @@ -70294,7 +72706,8 @@ paths: description: Unauthorized tags: - custom_objects - x-accepts: application/json + x-accepts: + - application/json /apis/{group}/{version}/{plural}: delete: description: Delete collection of cluster scoped custom objects @@ -70383,7 +72796,8 @@ paths: - custom_objects x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json get: description: list or watch cluster scoped custom objects operationId: listClusterCustomObject @@ -70496,7 +72910,9 @@ paths: description: Unauthorized tags: - custom_objects - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch post: description: Creates a cluster scoped Custom object operationId: createClusterCustomObject @@ -70581,7 +72997,8 @@ paths: - custom_objects x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json /apis/{group}/{version}/namespaces/{namespace}/{plural}: delete: description: Delete collection of namespace scoped custom objects @@ -70676,7 +73093,8 @@ paths: - custom_objects x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json get: description: list or watch namespace scoped custom objects operationId: listNamespacedCustomObject @@ -70795,7 +73213,9 @@ paths: description: Unauthorized tags: - custom_objects - x-accepts: application/json + x-accepts: + - application/json + - application/json;stream=watch post: description: Creates a namespace scoped Custom object operationId: createNamespacedCustomObject @@ -70884,7 +73304,8 @@ paths: - custom_objects x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json /apis/{group}/{version}/{plural}/{name}: delete: description: Deletes the specified cluster scoped custom object @@ -70968,7 +73389,8 @@ paths: - custom_objects x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json get: description: Returns a cluster scoped custom object operationId: getClusterCustomObject @@ -71010,7 +73432,8 @@ paths: description: Unauthorized tags: - custom_objects - x-accepts: application/json + x-accepts: + - application/json patch: description: patch the specified cluster scoped custom object operationId: patchClusterCustomObject @@ -71103,7 +73526,8 @@ paths: - custom_objects x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json put: description: replace the specified cluster scoped custom object operationId: replaceClusterCustomObject @@ -71187,7 +73611,8 @@ paths: - custom_objects x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json /apis/{group}/{version}/{plural}/{name}/status: get: description: read status of the specified cluster scoped custom object @@ -71236,7 +73661,10 @@ paths: description: Unauthorized tags: - custom_objects - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update status of the specified cluster scoped custom object @@ -71336,7 +73764,10 @@ paths: - custom_objects x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace status of the cluster scoped specified custom object operationId: replaceClusterCustomObjectStatus @@ -71437,7 +73868,10 @@ paths: - custom_objects x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/{group}/{version}/{plural}/{name}/scale: get: description: read scale of the specified custom object @@ -71486,7 +73920,10 @@ paths: description: Unauthorized tags: - custom_objects - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update scale of the specified cluster scoped custom object operationId: patchClusterCustomObjectScale @@ -71585,7 +74022,10 @@ paths: - custom_objects x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace scale of the specified cluster scoped custom object operationId: replaceClusterCustomObjectScale @@ -71686,7 +74126,10 @@ paths: - custom_objects x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}: delete: description: Deletes the specified namespace scoped custom object @@ -71776,7 +74219,8 @@ paths: - custom_objects x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json get: description: Returns a namespace scoped custom object operationId: getNamespacedCustomObject @@ -71824,7 +74268,8 @@ paths: description: Unauthorized tags: - custom_objects - x-accepts: application/json + x-accepts: + - application/json patch: description: patch the specified namespace scoped custom object operationId: patchNamespacedCustomObject @@ -71923,7 +74368,8 @@ paths: - custom_objects x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json put: description: replace the specified namespace scoped custom object operationId: replaceNamespacedCustomObject @@ -72013,7 +74459,8 @@ paths: - custom_objects x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json /apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/status: get: description: read status of the specified namespace scoped custom object @@ -72068,7 +74515,10 @@ paths: description: Unauthorized tags: - custom_objects - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update status of the specified namespace scoped custom object @@ -72174,7 +74624,10 @@ paths: - custom_objects x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace status of the specified namespace scoped custom object operationId: replaceNamespacedCustomObjectStatus @@ -72281,7 +74734,10 @@ paths: - custom_objects x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/scale: get: description: read scale of the specified namespace scoped custom object @@ -72336,7 +74792,10 @@ paths: description: Unauthorized tags: - custom_objects - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml patch: description: partially update scale of the specified namespace scoped custom object @@ -72442,7 +74901,10 @@ paths: - custom_objects x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml put: description: replace scale of the specified namespace scoped custom object operationId: replaceNamespacedCustomObjectScale @@ -72549,7 +75011,10 @@ paths: - custom_objects x-codegen-request-body-name: body x-content-type: application/json - x-accepts: application/json + x-accepts: + - application/json + - application/vnd.kubernetes.protobuf + - application/yaml /.well-known/openid-configuration: get: description: "get service account issuer OpenID configuration, also known as\ @@ -72567,7 +75032,8 @@ paths: description: Unauthorized tags: - WellKnown - x-accepts: application/json + x-accepts: + - application/json /openid/v1/jwks: get: description: get service account issuer OpenID JSON Web Key Set (contains public @@ -72585,7 +75051,8 @@ paths: description: Unauthorized tags: - openid - x-accepts: application/jwk-set+json + x-accepts: + - application/jwk-set+json components: schemas: v1.AuditAnnotation: @@ -74701,6 +77168,8 @@ components: type: string metadata: $ref: '#/components/schemas/v1.ListMeta' + required: + - items type: object x-kubernetes-group-version-kind: - group: admissionregistration.k8s.io @@ -75284,6 +77753,8 @@ components: type: string metadata: $ref: '#/components/schemas/v1.ListMeta' + required: + - items type: object x-kubernetes-group-version-kind: - group: admissionregistration.k8s.io @@ -77674,6 +80145,8 @@ components: type: string metadata: $ref: '#/components/schemas/v1.ListMeta' + required: + - items type: object x-kubernetes-group-version-kind: - group: admissionregistration.k8s.io @@ -78257,6 +80730,8 @@ components: type: string metadata: $ref: '#/components/schemas/v1.ListMeta' + required: + - items type: object x-kubernetes-group-version-kind: - group: admissionregistration.k8s.io @@ -79766,6 +82241,8 @@ components: type: string metadata: $ref: '#/components/schemas/v1.ListMeta' + required: + - items type: object x-kubernetes-group-version-kind: - group: admissionregistration.k8s.io @@ -80349,6 +82826,8 @@ components: type: string metadata: $ref: '#/components/schemas/v1.ListMeta' + required: + - items type: object x-kubernetes-group-version-kind: - group: admissionregistration.k8s.io @@ -169344,7 +171823,10 @@ components: optional: true properties: name: - description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names" + description: "Name of the referent. This field is effectively required,\ + \ but due to backwards compatibility is allowed to be empty. Instances\ + \ of this type with an empty value here are almost certainly wrong. More\ + \ info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names" type: string optional: description: Specify whether the ConfigMap must be defined @@ -169361,7 +171843,10 @@ components: description: The key to select. type: string name: - description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names" + description: "Name of the referent. This field is effectively required,\ + \ but due to backwards compatibility is allowed to be empty. Instances\ + \ of this type with an empty value here are almost certainly wrong. More\ + \ info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names" type: string optional: description: Specify whether the ConfigMap or its key must be defined @@ -169580,7 +172065,10 @@ components: type: array x-kubernetes-list-type: atomic name: - description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names" + description: "Name of the referent. This field is effectively required,\ + \ but due to backwards compatibility is allowed to be empty. Instances\ + \ of this type with an empty value here are almost certainly wrong. More\ + \ info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names" type: string optional: description: optional specify whether the ConfigMap or its keys must be @@ -169627,7 +172115,10 @@ components: type: array x-kubernetes-list-type: atomic name: - description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names" + description: "Name of the referent. This field is effectively required,\ + \ but due to backwards compatibility is allowed to be empty. Instances\ + \ of this type with an empty value here are almost certainly wrong. More\ + \ info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names" type: string optional: description: optional specify whether the ConfigMap or its keys must be @@ -172628,6 +175119,8 @@ components: ip: description: IP address of the host file entry. type: string + required: + - ip type: object v1.HostIP: description: HostIP represents a single IP address allocated to the host. @@ -172637,6 +175130,8 @@ components: ip: description: IP is the IP address assigned to the host type: string + required: + - ip type: object v1.HostPathVolumeSource: description: Represents a host path mapped into a pod. Host path volumes do @@ -173368,7 +175863,10 @@ components: name: name properties: name: - description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names" + description: "Name of the referent. This field is effectively required,\ + \ but due to backwards compatibility is allowed to be empty. Instances\ + \ of this type with an empty value here are almost certainly wrong. More\ + \ info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names" type: string type: object x-kubernetes-map-type: atomic @@ -181165,6 +183663,8 @@ components: ip: description: IP is the IP address assigned to the pod type: string + required: + - ip type: object v1.PodList: description: PodList is a list of Pods. @@ -218072,7 +220572,10 @@ components: optional: true properties: name: - description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names" + description: "Name of the referent. This field is effectively required,\ + \ but due to backwards compatibility is allowed to be empty. Instances\ + \ of this type with an empty value here are almost certainly wrong. More\ + \ info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names" type: string optional: description: Specify whether the Secret must be defined @@ -218090,7 +220593,10 @@ components: key. type: string name: - description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names" + description: "Name of the referent. This field is effectively required,\ + \ but due to backwards compatibility is allowed to be empty. Instances\ + \ of this type with an empty value here are almost certainly wrong. More\ + \ info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names" type: string optional: description: Specify whether the Secret or its key must be defined @@ -218274,7 +220780,10 @@ components: type: array x-kubernetes-list-type: atomic name: - description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names" + description: "Name of the referent. This field is effectively required,\ + \ but due to backwards compatibility is allowed to be empty. Instances\ + \ of this type with an empty value here are almost certainly wrong. More\ + \ info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names" type: string optional: description: optional field specify whether the Secret or its key must be @@ -219511,7 +222020,8 @@ components: \ use this field as a hint, but are not required to guarantee strict adherence.\ \ If the field is not set, the implementation will apply its default routing\ \ strategy. If set to \"PreferClose\", implementations should prioritize\ - \ endpoints that are topologically close (e.g., same zone)." + \ endpoints that are topologically close (e.g., same zone). This is an\ + \ alpha field and requires enabling ServiceTrafficDistribution feature." type: string type: description: "type determines how the Service is exposed. Defaults to ClusterIP.\ diff --git a/kubernetes/docs/V1ConfigMapEnvSource.md b/kubernetes/docs/V1ConfigMapEnvSource.md index 9a8879acd9..77658d5f55 100644 --- a/kubernetes/docs/V1ConfigMapEnvSource.md +++ b/kubernetes/docs/V1ConfigMapEnvSource.md @@ -8,7 +8,7 @@ ConfigMapEnvSource selects a ConfigMap to populate the environment variables wit | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**name** | **String** | Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names | [optional] | +|**name** | **String** | Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names | [optional] | |**optional** | **Boolean** | Specify whether the ConfigMap must be defined | [optional] | diff --git a/kubernetes/docs/V1ConfigMapKeySelector.md b/kubernetes/docs/V1ConfigMapKeySelector.md index d5a9c8e718..3901a37bf4 100644 --- a/kubernetes/docs/V1ConfigMapKeySelector.md +++ b/kubernetes/docs/V1ConfigMapKeySelector.md @@ -9,7 +9,7 @@ Selects a key from a ConfigMap. | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**key** | **String** | The key to select. | | -|**name** | **String** | Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names | [optional] | +|**name** | **String** | Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names | [optional] | |**optional** | **Boolean** | Specify whether the ConfigMap or its key must be defined | [optional] | diff --git a/kubernetes/docs/V1ConfigMapProjection.md b/kubernetes/docs/V1ConfigMapProjection.md index 008bc8c1a6..920064e2c0 100644 --- a/kubernetes/docs/V1ConfigMapProjection.md +++ b/kubernetes/docs/V1ConfigMapProjection.md @@ -9,7 +9,7 @@ Adapts a ConfigMap into a projected volume. The contents of the target ConfigMa | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**items** | [**List<V1KeyToPath>**](V1KeyToPath.md) | items 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 '..'. | [optional] | -|**name** | **String** | Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names | [optional] | +|**name** | **String** | Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names | [optional] | |**optional** | **Boolean** | optional specify whether the ConfigMap or its keys must be defined | [optional] | diff --git a/kubernetes/docs/V1ConfigMapVolumeSource.md b/kubernetes/docs/V1ConfigMapVolumeSource.md index 87176500dd..2b6341b76f 100644 --- a/kubernetes/docs/V1ConfigMapVolumeSource.md +++ b/kubernetes/docs/V1ConfigMapVolumeSource.md @@ -10,7 +10,7 @@ Adapts a ConfigMap into a volume. The contents of the target ConfigMap's Data f |------------ | ------------- | ------------- | -------------| |**defaultMode** | **Integer** | defaultMode is optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. 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. | [optional] | |**items** | [**List<V1KeyToPath>**](V1KeyToPath.md) | items 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 '..'. | [optional] | -|**name** | **String** | Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names | [optional] | +|**name** | **String** | Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names | [optional] | |**optional** | **Boolean** | optional specify whether the ConfigMap or its keys must be defined | [optional] | diff --git a/kubernetes/docs/V1HostAlias.md b/kubernetes/docs/V1HostAlias.md index fc3f59a5ea..7f1f756008 100644 --- a/kubernetes/docs/V1HostAlias.md +++ b/kubernetes/docs/V1HostAlias.md @@ -9,7 +9,7 @@ HostAlias holds the mapping between IP and hostnames that will be injected as an | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**hostnames** | **List<String>** | Hostnames for the above IP address. | [optional] | -|**ip** | **String** | IP address of the host file entry. | [optional] | +|**ip** | **String** | IP address of the host file entry. | | diff --git a/kubernetes/docs/V1HostIP.md b/kubernetes/docs/V1HostIP.md index 45c3ccd3a7..c6cbf0ac66 100644 --- a/kubernetes/docs/V1HostIP.md +++ b/kubernetes/docs/V1HostIP.md @@ -8,7 +8,7 @@ HostIP represents a single IP address allocated to the host. | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**ip** | **String** | IP is the IP address assigned to the host | [optional] | +|**ip** | **String** | IP is the IP address assigned to the host | | diff --git a/kubernetes/docs/V1LocalObjectReference.md b/kubernetes/docs/V1LocalObjectReference.md index 183e4be55b..33a0577203 100644 --- a/kubernetes/docs/V1LocalObjectReference.md +++ b/kubernetes/docs/V1LocalObjectReference.md @@ -8,7 +8,7 @@ LocalObjectReference contains enough information to let you locate the reference | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**name** | **String** | Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names | [optional] | +|**name** | **String** | Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names | [optional] | diff --git a/kubernetes/docs/V1PodIP.md b/kubernetes/docs/V1PodIP.md index 165385bc0b..9f23353d6c 100644 --- a/kubernetes/docs/V1PodIP.md +++ b/kubernetes/docs/V1PodIP.md @@ -8,7 +8,7 @@ PodIP represents a single IP address allocated to the pod. | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**ip** | **String** | IP is the IP address assigned to the pod | [optional] | +|**ip** | **String** | IP is the IP address assigned to the pod | | diff --git a/kubernetes/docs/V1SecretEnvSource.md b/kubernetes/docs/V1SecretEnvSource.md index be2d5de177..56a1d5d18d 100644 --- a/kubernetes/docs/V1SecretEnvSource.md +++ b/kubernetes/docs/V1SecretEnvSource.md @@ -8,7 +8,7 @@ SecretEnvSource selects a Secret to populate the environment variables with. Th | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**name** | **String** | Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names | [optional] | +|**name** | **String** | Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names | [optional] | |**optional** | **Boolean** | Specify whether the Secret must be defined | [optional] | diff --git a/kubernetes/docs/V1SecretKeySelector.md b/kubernetes/docs/V1SecretKeySelector.md index 4b94afd5dd..2a8b18b6b5 100644 --- a/kubernetes/docs/V1SecretKeySelector.md +++ b/kubernetes/docs/V1SecretKeySelector.md @@ -9,7 +9,7 @@ SecretKeySelector selects a key of a Secret. | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**key** | **String** | The key of the secret to select from. Must be a valid secret key. | | -|**name** | **String** | Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names | [optional] | +|**name** | **String** | Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names | [optional] | |**optional** | **Boolean** | Specify whether the Secret or its key must be defined | [optional] | diff --git a/kubernetes/docs/V1SecretProjection.md b/kubernetes/docs/V1SecretProjection.md index 1bd5794e14..0e1145b3c5 100644 --- a/kubernetes/docs/V1SecretProjection.md +++ b/kubernetes/docs/V1SecretProjection.md @@ -9,7 +9,7 @@ Adapts a secret into a projected volume. The contents of the target Secret's Da | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**items** | [**List<V1KeyToPath>**](V1KeyToPath.md) | items 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 '..'. | [optional] | -|**name** | **String** | Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names | [optional] | +|**name** | **String** | Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names | [optional] | |**optional** | **Boolean** | optional field specify whether the Secret or its key must be defined | [optional] | diff --git a/kubernetes/docs/V1ServiceSpec.md b/kubernetes/docs/V1ServiceSpec.md index 82c1275bc3..8135c63f86 100644 --- a/kubernetes/docs/V1ServiceSpec.md +++ b/kubernetes/docs/V1ServiceSpec.md @@ -26,7 +26,7 @@ ServiceSpec describes the attributes that a user creates on a service. |**selector** | **Map<String, String>** | 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: https://kubernetes.io/docs/concepts/services-networking/service/ | [optional] | |**sessionAffinity** | **String** | 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: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies | [optional] | |**sessionAffinityConfig** | [**V1SessionAffinityConfig**](V1SessionAffinityConfig.md) | | [optional] | -|**trafficDistribution** | **String** | TrafficDistribution offers a way to express preferences for how traffic is distributed to Service endpoints. Implementations can use this field as a hint, but are not required to guarantee strict adherence. If the field is not set, the implementation will apply its default routing strategy. If set to \"PreferClose\", implementations should prioritize endpoints that are topologically close (e.g., same zone). | [optional] | +|**trafficDistribution** | **String** | TrafficDistribution offers a way to express preferences for how traffic is distributed to Service endpoints. Implementations can use this field as a hint, but are not required to guarantee strict adherence. If the field is not set, the implementation will apply its default routing strategy. If set to \"PreferClose\", implementations should prioritize endpoints that are topologically close (e.g., same zone). This is an alpha field and requires enabling ServiceTrafficDistribution feature. | [optional] | |**type** | **String** | type determines how the Service is exposed. Defaults to ClusterIP. Valid options are ExternalName, ClusterIP, NodePort, and LoadBalancer. \"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 or EndpointSlice objects. If clusterIP is \"None\", no virtual IP is allocated and the endpoints are published as a set of endpoints rather than a virtual IP. \"NodePort\" builds on ClusterIP and allocates a port on every node which routes to the same endpoints as the clusterIP. \"LoadBalancer\" builds on NodePort and creates an external load-balancer (if supported in the current cloud) which routes to the same endpoints as the clusterIP. \"ExternalName\" aliases this service to the specified externalName. Several other fields do not apply to ExternalName services. More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types | [optional] | diff --git a/kubernetes/docs/V1ValidatingAdmissionPolicyBindingList.md b/kubernetes/docs/V1ValidatingAdmissionPolicyBindingList.md index d8bad34dd3..3fbfa94b01 100644 --- a/kubernetes/docs/V1ValidatingAdmissionPolicyBindingList.md +++ b/kubernetes/docs/V1ValidatingAdmissionPolicyBindingList.md @@ -9,7 +9,7 @@ ValidatingAdmissionPolicyBindingList is a list of ValidatingAdmissionPolicyBindi | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**apiVersion** | **String** | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources | [optional] | -|**items** | [**List<V1ValidatingAdmissionPolicyBinding>**](V1ValidatingAdmissionPolicyBinding.md) | List of PolicyBinding. | [optional] | +|**items** | [**List<V1ValidatingAdmissionPolicyBinding>**](V1ValidatingAdmissionPolicyBinding.md) | List of PolicyBinding. | | |**kind** | **String** | Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds | [optional] | |**metadata** | [**V1ListMeta**](V1ListMeta.md) | | [optional] | diff --git a/kubernetes/docs/V1ValidatingAdmissionPolicyList.md b/kubernetes/docs/V1ValidatingAdmissionPolicyList.md index 5057a010a3..d6229c3833 100644 --- a/kubernetes/docs/V1ValidatingAdmissionPolicyList.md +++ b/kubernetes/docs/V1ValidatingAdmissionPolicyList.md @@ -9,7 +9,7 @@ ValidatingAdmissionPolicyList is a list of ValidatingAdmissionPolicy. | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**apiVersion** | **String** | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources | [optional] | -|**items** | [**List<V1ValidatingAdmissionPolicy>**](V1ValidatingAdmissionPolicy.md) | List of ValidatingAdmissionPolicy. | [optional] | +|**items** | [**List<V1ValidatingAdmissionPolicy>**](V1ValidatingAdmissionPolicy.md) | List of ValidatingAdmissionPolicy. | | |**kind** | **String** | Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds | [optional] | |**metadata** | [**V1ListMeta**](V1ListMeta.md) | | [optional] | diff --git a/kubernetes/docs/V1alpha1ValidatingAdmissionPolicyBindingList.md b/kubernetes/docs/V1alpha1ValidatingAdmissionPolicyBindingList.md index 0ae842b819..0f337b45c9 100644 --- a/kubernetes/docs/V1alpha1ValidatingAdmissionPolicyBindingList.md +++ b/kubernetes/docs/V1alpha1ValidatingAdmissionPolicyBindingList.md @@ -9,7 +9,7 @@ ValidatingAdmissionPolicyBindingList is a list of ValidatingAdmissionPolicyBindi | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**apiVersion** | **String** | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources | [optional] | -|**items** | [**List<V1alpha1ValidatingAdmissionPolicyBinding>**](V1alpha1ValidatingAdmissionPolicyBinding.md) | List of PolicyBinding. | [optional] | +|**items** | [**List<V1alpha1ValidatingAdmissionPolicyBinding>**](V1alpha1ValidatingAdmissionPolicyBinding.md) | List of PolicyBinding. | | |**kind** | **String** | Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds | [optional] | |**metadata** | [**V1ListMeta**](V1ListMeta.md) | | [optional] | diff --git a/kubernetes/docs/V1alpha1ValidatingAdmissionPolicyList.md b/kubernetes/docs/V1alpha1ValidatingAdmissionPolicyList.md index 05db4fb968..aad2631452 100644 --- a/kubernetes/docs/V1alpha1ValidatingAdmissionPolicyList.md +++ b/kubernetes/docs/V1alpha1ValidatingAdmissionPolicyList.md @@ -9,7 +9,7 @@ ValidatingAdmissionPolicyList is a list of ValidatingAdmissionPolicy. | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**apiVersion** | **String** | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources | [optional] | -|**items** | [**List<V1alpha1ValidatingAdmissionPolicy>**](V1alpha1ValidatingAdmissionPolicy.md) | List of ValidatingAdmissionPolicy. | [optional] | +|**items** | [**List<V1alpha1ValidatingAdmissionPolicy>**](V1alpha1ValidatingAdmissionPolicy.md) | List of ValidatingAdmissionPolicy. | | |**kind** | **String** | Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds | [optional] | |**metadata** | [**V1ListMeta**](V1ListMeta.md) | | [optional] | diff --git a/kubernetes/docs/V1beta1ValidatingAdmissionPolicyBindingList.md b/kubernetes/docs/V1beta1ValidatingAdmissionPolicyBindingList.md index 1a1c1a3db8..84922833b6 100644 --- a/kubernetes/docs/V1beta1ValidatingAdmissionPolicyBindingList.md +++ b/kubernetes/docs/V1beta1ValidatingAdmissionPolicyBindingList.md @@ -9,7 +9,7 @@ ValidatingAdmissionPolicyBindingList is a list of ValidatingAdmissionPolicyBindi | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**apiVersion** | **String** | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources | [optional] | -|**items** | [**List<V1beta1ValidatingAdmissionPolicyBinding>**](V1beta1ValidatingAdmissionPolicyBinding.md) | List of PolicyBinding. | [optional] | +|**items** | [**List<V1beta1ValidatingAdmissionPolicyBinding>**](V1beta1ValidatingAdmissionPolicyBinding.md) | List of PolicyBinding. | | |**kind** | **String** | Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds | [optional] | |**metadata** | [**V1ListMeta**](V1ListMeta.md) | | [optional] | diff --git a/kubernetes/docs/V1beta1ValidatingAdmissionPolicyList.md b/kubernetes/docs/V1beta1ValidatingAdmissionPolicyList.md index 6a9271adf6..2a5bd91006 100644 --- a/kubernetes/docs/V1beta1ValidatingAdmissionPolicyList.md +++ b/kubernetes/docs/V1beta1ValidatingAdmissionPolicyList.md @@ -9,7 +9,7 @@ ValidatingAdmissionPolicyList is a list of ValidatingAdmissionPolicy. | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**apiVersion** | **String** | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources | [optional] | -|**items** | [**List<V1beta1ValidatingAdmissionPolicy>**](V1beta1ValidatingAdmissionPolicy.md) | List of ValidatingAdmissionPolicy. | [optional] | +|**items** | [**List<V1beta1ValidatingAdmissionPolicy>**](V1beta1ValidatingAdmissionPolicy.md) | List of ValidatingAdmissionPolicy. | | |**kind** | **String** | Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds | [optional] | |**metadata** | [**V1ListMeta**](V1ListMeta.md) | | [optional] | diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/ApiCallback.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/ApiCallback.java index 6dac807a7c..3cb9d6a2ba 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/ApiCallback.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/ApiCallback.java @@ -1,15 +1,16 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi; import java.io.IOException; diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/ApiClient.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/ApiClient.java index cf19a3387f..4d5271bcc9 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/ApiClient.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/ApiClient.java @@ -1,15 +1,16 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi; import okhttp3.*; @@ -46,6 +47,7 @@ import java.util.*; import java.util.Map.Entry; import java.util.concurrent.TimeUnit; +import java.util.function.Supplier; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -465,6 +467,19 @@ public void setAWS4Configuration(String accessKey, String secretKey, String regi throw new RuntimeException("No AWS4 authentication configured!"); } + /** + * Helper method to set credentials for AWSV4 Signature + * + * @param accessKey Access Key + * @param secretKey Secret Key + * @param sessionToken Session Token + * @param region Region + * @param service Service to access to + */ + public void setAWS4Configuration(String accessKey, String secretKey, String sessionToken, String region, String service) { + throw new RuntimeException("No AWS4 authentication configured!"); + } + /** * Set the User-Agent header's value (by adding to the default header map). * @@ -1167,12 +1182,15 @@ public Request buildRequest(String baseUrl, String path, String method, ListApiException class.

*/ @SuppressWarnings("serial") -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class ApiException extends Exception { + private static final long serialVersionUID = 1L; + private int code = 0; private Map> responseHeaders = null; private String responseBody = null; diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/ApiResponse.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/ApiResponse.java index 3228aa6911..fe527046da 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/ApiResponse.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/ApiResponse.java @@ -1,15 +1,16 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi; import java.util.List; @@ -58,7 +59,7 @@ public int getStatusCode() { /** *

Get the headers.

* - * @return a {@link java.util.Map} of headers + * @return a {@link java.util.Map} of headers */ public Map> getHeaders() { return headers; diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/Configuration.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/Configuration.java index 9fd493bde3..7402b695f8 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/Configuration.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/Configuration.java @@ -1,18 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi; -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class Configuration { public static final String VERSION = "21.0.0-SNAPSHOT"; diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/GzipRequestInterceptor.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/GzipRequestInterceptor.java index 7b0cf738c6..1cde47526e 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/GzipRequestInterceptor.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/GzipRequestInterceptor.java @@ -1,15 +1,16 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi; import okhttp3.*; diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/JSON.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/JSON.java index 761bae299a..096c6a7623 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/JSON.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/JSON.java @@ -1,30 +1,29 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi; +import com.fasterxml.jackson.databind.util.StdDateFormat; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.gson.JsonParseException; import com.google.gson.TypeAdapter; -import com.google.gson.internal.bind.util.ISO8601Utils; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import com.google.gson.JsonElement; import io.gsonfire.GsonFireBuilder; import io.gsonfire.TypeSelector; -import io.kubernetes.client.gson.V1StatusPreProcessor; -import io.kubernetes.client.openapi.models.V1Status; import okio.ByteString; import java.io.IOException; @@ -32,17 +31,16 @@ import java.lang.reflect.Type; import java.text.DateFormat; import java.text.ParseException; -import java.text.ParsePosition; import java.time.LocalDate; import java.time.OffsetDateTime; +import java.time.ZoneId; +import java.time.ZoneOffset; import java.time.format.DateTimeFormatter; -import java.time.format.DateTimeFormatterBuilder; -import java.time.format.DateTimeParseException; -import java.time.temporal.ChronoField; import java.util.Date; import java.util.Locale; import java.util.Map; import java.util.HashMap; +import java.util.TimeZone; /* * A JSON utility class @@ -53,30 +51,22 @@ public class JSON { private static Gson gson; private static boolean isLenientOnJson = false; - - private static final DateTimeFormatter RFC3339MICRO_FORMATTER = - new DateTimeFormatterBuilder() - .parseDefaulting(ChronoField.OFFSET_SECONDS, 0) - .append(DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss")) - .optionalStart() - .appendFraction(ChronoField.NANO_OF_SECOND, 6, 6, true) - .optionalEnd() - .appendLiteral("Z") - .toFormatter(); private static DateTypeAdapter dateTypeAdapter = new DateTypeAdapter(); private static SqlDateTypeAdapter sqlDateTypeAdapter = new SqlDateTypeAdapter(); - private static OffsetDateTimeTypeAdapter offsetDateTimeTypeAdapter = new OffsetDateTimeTypeAdapter(RFC3339MICRO_FORMATTER); + private static OffsetDateTimeTypeAdapter offsetDateTimeTypeAdapter = new OffsetDateTimeTypeAdapter(); private static LocalDateTypeAdapter localDateTypeAdapter = new LocalDateTypeAdapter(); private static ByteArrayAdapter byteArrayAdapter = new ByteArrayAdapter(); + private static final StdDateFormat sdf = new StdDateFormat() + .withTimeZone(TimeZone.getTimeZone(ZoneId.systemDefault())) + .withColonInTimeZone(true); + private static final DateTimeFormatter dtf = DateTimeFormatter.ISO_OFFSET_DATE_TIME; + @SuppressWarnings("unchecked") public static GsonBuilder createGson() { GsonFireBuilder fireBuilder = new GsonFireBuilder() ; - GsonBuilder builder = - fireBuilder - .registerPreProcessor(V1Status.class, new V1StatusPreProcessor()) - .createGsonBuilder(); + GsonBuilder builder = fireBuilder.createGsonBuilder(); return builder; } @@ -795,14 +785,11 @@ public static class ByteArrayAdapter extends TypeAdapter { @Override public void write(JsonWriter out, byte[] value) throws IOException { - boolean oldHtmlSafe = out.isHtmlSafe(); - out.setHtmlSafe(false); if (value == null) { out.nullValue(); } else { out.value(ByteString.of(value).base64()); } - out.setHtmlSafe(oldHtmlSafe); } @Override @@ -858,12 +845,7 @@ public OffsetDateTime read(JsonReader in) throws IOException { if (date.endsWith("+0000")) { date = date.substring(0, date.length()-5) + "Z"; } - try { - return OffsetDateTime.parse(date, formatter); - } catch (DateTimeParseException e) { - // backward-compatibility for ISO8601 timestamp format - return OffsetDateTime.parse(date, DateTimeFormatter.ISO_OFFSET_DATE_TIME); - } + return OffsetDateTime.parse(date, formatter); } } } @@ -963,7 +945,7 @@ public java.sql.Date read(JsonReader in) throws IOException { if (dateFormat != null) { return new java.sql.Date(dateFormat.parse(date).getTime()); } - return new java.sql.Date(ISO8601Utils.parse(date, new ParsePosition(0)).getTime()); + return new java.sql.Date(sdf.parse(date).getTime()); } catch (ParseException e) { throw new JsonParseException(e); } @@ -973,7 +955,7 @@ public java.sql.Date read(JsonReader in) throws IOException { /** * Gson TypeAdapter for java.util.Date type - * If the dateFormat is null, ISO8601Utils will be used. + * If the dateFormat is null, DateTimeFormatter will be used. */ public static class DateTypeAdapter extends TypeAdapter { @@ -998,7 +980,7 @@ public void write(JsonWriter out, Date date) throws IOException { if (dateFormat != null) { value = dateFormat.format(date); } else { - value = ISO8601Utils.format(date, true); + value = date.toInstant().atOffset(ZoneOffset.UTC).format(dtf); } out.value(value); } @@ -1017,7 +999,7 @@ public Date read(JsonReader in) throws IOException { if (dateFormat != null) { return dateFormat.parse(date); } - return ISO8601Utils.parse(date, new ParsePosition(0)); + return sdf.parse(date); } catch (ParseException e) { throw new JsonParseException(e); } diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/Pair.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/Pair.java index ddcc4286ad..c26664ffa1 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/Pair.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/Pair.java @@ -1,18 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi; -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class Pair { private String name = ""; private String value = ""; diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/ProgressRequestBody.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/ProgressRequestBody.java index e042f2088d..d3f827fec2 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/ProgressRequestBody.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/ProgressRequestBody.java @@ -1,15 +1,16 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi; import okhttp3.MediaType; diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/ProgressResponseBody.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/ProgressResponseBody.java index c239f01743..ec7ede1333 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/ProgressResponseBody.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/ProgressResponseBody.java @@ -1,15 +1,16 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi; import okhttp3.MediaType; diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/ServerConfiguration.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/ServerConfiguration.java index b9808b2b01..c640684ba3 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/ServerConfiguration.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/ServerConfiguration.java @@ -1,15 +1,3 @@ -/* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ package io.kubernetes.client.openapi; import java.util.Map; @@ -17,6 +5,7 @@ /** * Representing a Server configuration. */ +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class ServerConfiguration { public String URL; public String description; diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/ServerVariable.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/ServerVariable.java index c3ebfbaa22..90b15235ef 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/ServerVariable.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/ServerVariable.java @@ -1,15 +1,3 @@ -/* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ package io.kubernetes.client.openapi; import java.util.HashSet; @@ -17,6 +5,7 @@ /** * Representing a Server Variable for server URL template substitution. */ +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class ServerVariable { public String description; public String defaultValue; diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/StringUtil.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/StringUtil.java index b0ac719323..b954525ca8 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/StringUtil.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/StringUtil.java @@ -1,21 +1,22 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi; import java.util.Collection; import java.util.Iterator; -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class StringUtil { /** * Check if the given array contains the given value (with case-insensitive comparison). diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/AdmissionregistrationApi.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/AdmissionregistrationApi.java index 6de18afb8c..80d3cb62a1 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/AdmissionregistrationApi.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/AdmissionregistrationApi.java @@ -1,15 +1,16 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.apis; import io.kubernetes.client.openapi.ApiCallback; @@ -33,7 +34,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import jakarta.ws.rs.core.GenericType; public class AdmissionregistrationApi { private ApiClient localVarApiClient; @@ -209,7 +209,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws } /** - * + * * get information of a group * @return APIgetAPIGroupRequest * @http.response.details diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/AdmissionregistrationV1Api.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/AdmissionregistrationV1Api.java index 42b2ecd3ef..b984f99af4 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/AdmissionregistrationV1Api.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/AdmissionregistrationV1Api.java @@ -1,15 +1,16 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.apis; import io.kubernetes.client.openapi.ApiCallback; @@ -44,7 +45,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import jakarta.ws.rs.core.GenericType; public class AdmissionregistrationV1Api { private ApiClient localVarApiClient; @@ -296,7 +296,7 @@ public okhttp3.Call executeAsync(final ApiCallback } /** - * + * * create a ValidatingAdmissionPolicy * @param body (required) * @return APIcreateValidatingAdmissionPolicyRequest @@ -754,7 +754,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete collection of MutatingWebhookConfiguration * @return APIdeleteCollectionMutatingWebhookConfigurationRequest * @http.response.details @@ -1700,7 +1700,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete collection of ValidatingAdmissionPolicy * @return APIdeleteCollectionValidatingAdmissionPolicyRequest * @http.response.details @@ -2057,7 +2057,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete collection of ValidatingAdmissionPolicyBinding * @return APIdeleteCollectionValidatingAdmissionPolicyBindingRequest * @http.response.details @@ -2414,7 +2414,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete collection of ValidatingWebhookConfiguration * @return APIdeleteCollectionValidatingWebhookConfigurationRequest * @http.response.details @@ -2663,7 +2663,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete a MutatingWebhookConfiguration * @param name name of the MutatingWebhookConfiguration (required) * @return APIdeleteMutatingWebhookConfigurationRequest @@ -2914,7 +2914,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete a ValidatingAdmissionPolicy * @param name name of the ValidatingAdmissionPolicy (required) * @return APIdeleteValidatingAdmissionPolicyRequest @@ -3165,7 +3165,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete a ValidatingAdmissionPolicyBinding * @param name name of the ValidatingAdmissionPolicyBinding (required) * @return APIdeleteValidatingAdmissionPolicyBindingRequest @@ -3416,7 +3416,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete a ValidatingWebhookConfiguration * @param name name of the ValidatingWebhookConfiguration (required) * @return APIdeleteValidatingWebhookConfigurationRequest @@ -3568,7 +3568,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) } /** - * + * * get available resources * @return APIgetAPIResourcesRequest * @http.response.details @@ -3885,7 +3885,7 @@ public okhttp3.Call executeAsync(final ApiCallback } /** - * + * * partially update the specified ValidatingAdmissionPolicy * @param name name of the ValidatingAdmissionPolicy (required) * @param body (required) @@ -5577,7 +5577,7 @@ public okhttp3.Call executeAsync(final ApiCallback } /** - * + * * partially update status of the specified ValidatingAdmissionPolicy * @param name name of the ValidatingAdmissionPolicy (required) * @param body (required) @@ -6073,7 +6073,7 @@ public okhttp3.Call executeAsync(final ApiCallback } /** - * + * * read the specified ValidatingAdmissionPolicy * @param name name of the ValidatingAdmissionPolicy (required) * @return APIreadValidatingAdmissionPolicyRequest @@ -6597,7 +6597,7 @@ public okhttp3.Call executeAsync(final ApiCallback } /** - * + * * read status of the specified ValidatingAdmissionPolicy * @param name name of the ValidatingAdmissionPolicy (required) * @return APIreadValidatingAdmissionPolicyStatusRequest @@ -6945,7 +6945,7 @@ public okhttp3.Call executeAsync(final ApiCallback } /** - * + * * replace the specified ValidatingAdmissionPolicy * @param name name of the ValidatingAdmissionPolicy (required) * @param body (required) @@ -7642,7 +7642,7 @@ public okhttp3.Call executeAsync(final ApiCallback } /** - * + * * replace status of the specified ValidatingAdmissionPolicy * @param name name of the ValidatingAdmissionPolicy (required) * @param body (required) @@ -8108,7 +8108,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete collection of ValidatingAdmissionPolicy * @return APIdeleteCollectionValidatingAdmissionPolicyRequest * @http.response.details @@ -1238,7 +1238,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete collection of ValidatingAdmissionPolicyBinding * @return APIdeleteCollectionValidatingAdmissionPolicyBindingRequest * @http.response.details @@ -1487,7 +1487,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete a ValidatingAdmissionPolicy * @param name name of the ValidatingAdmissionPolicy (required) * @return APIdeleteValidatingAdmissionPolicyRequest @@ -1738,7 +1738,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete a ValidatingAdmissionPolicyBinding * @param name name of the ValidatingAdmissionPolicyBinding (required) * @return APIdeleteValidatingAdmissionPolicyBindingRequest @@ -1890,7 +1890,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) } /** - * + * * get available resources * @return APIgetAPIResourcesRequest * @http.response.details @@ -2207,7 +2207,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete collection of ValidatingAdmissionPolicy * @return APIdeleteCollectionValidatingAdmissionPolicyRequest * @http.response.details @@ -1238,7 +1238,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete collection of ValidatingAdmissionPolicyBinding * @return APIdeleteCollectionValidatingAdmissionPolicyBindingRequest * @http.response.details @@ -1487,7 +1487,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete a ValidatingAdmissionPolicy * @param name name of the ValidatingAdmissionPolicy (required) * @return APIdeleteValidatingAdmissionPolicyRequest @@ -1738,7 +1738,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete a ValidatingAdmissionPolicyBinding * @param name name of the ValidatingAdmissionPolicyBinding (required) * @return APIdeleteValidatingAdmissionPolicyBindingRequest @@ -1890,7 +1890,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) } /** - * + * * get available resources * @return APIgetAPIResourcesRequest * @http.response.details @@ -2207,7 +2207,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws } /** - * + * * get information of a group * @return APIgetAPIGroupRequest * @http.response.details diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/ApiextensionsV1Api.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/ApiextensionsV1Api.java index 60903d5b70..86a2c092bf 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/ApiextensionsV1Api.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/ApiextensionsV1Api.java @@ -1,15 +1,16 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.apis; import io.kubernetes.client.openapi.ApiCallback; @@ -38,7 +39,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import jakarta.ws.rs.core.GenericType; public class ApiextensionsV1Api { private ApiClient localVarApiClient; @@ -290,7 +290,7 @@ public okhttp3.Call executeAsync(final ApiCallback _ } /** - * + * * create a CustomResourceDefinition * @param body (required) * @return APIcreateCustomResourceDefinitionRequest @@ -650,7 +650,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete collection of CustomResourceDefinition * @return APIdeleteCollectionCustomResourceDefinitionRequest * @http.response.details @@ -899,7 +899,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete a CustomResourceDefinition * @param name name of the CustomResourceDefinition (required) * @return APIdeleteCustomResourceDefinitionRequest @@ -1051,7 +1051,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) } /** - * + * * get available resources * @return APIgetAPIResourcesRequest * @http.response.details @@ -1368,7 +1368,7 @@ public okhttp3.Call executeAsync(final ApiCallback _ } /** - * + * * partially update the specified CustomResourceDefinition * @param name name of the CustomResourceDefinition (required) * @param body (required) @@ -1861,7 +1861,7 @@ public okhttp3.Call executeAsync(final ApiCallback _ } /** - * + * * partially update status of the specified CustomResourceDefinition * @param name name of the CustomResourceDefinition (required) * @param body (required) @@ -2037,7 +2037,7 @@ public okhttp3.Call executeAsync(final ApiCallback _ } /** - * + * * read the specified CustomResourceDefinition * @param name name of the CustomResourceDefinition (required) * @return APIreadCustomResourceDefinitionRequest @@ -2211,7 +2211,7 @@ public okhttp3.Call executeAsync(final ApiCallback _ } /** - * + * * read status of the specified CustomResourceDefinition * @param name name of the CustomResourceDefinition (required) * @return APIreadCustomResourceDefinitionStatusRequest @@ -2442,7 +2442,7 @@ public okhttp3.Call executeAsync(final ApiCallback _ } /** - * + * * replace the specified CustomResourceDefinition * @param name name of the CustomResourceDefinition (required) * @param body (required) @@ -2675,7 +2675,7 @@ public okhttp3.Call executeAsync(final ApiCallback _ } /** - * + * * replace status of the specified CustomResourceDefinition * @param name name of the CustomResourceDefinition (required) * @param body (required) diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/ApiregistrationApi.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/ApiregistrationApi.java index 7f1da9fda6..bf85b944b7 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/ApiregistrationApi.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/ApiregistrationApi.java @@ -1,15 +1,16 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.apis; import io.kubernetes.client.openapi.ApiCallback; @@ -33,7 +34,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import jakarta.ws.rs.core.GenericType; public class ApiregistrationApi { private ApiClient localVarApiClient; @@ -209,7 +209,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws } /** - * + * * get information of a group * @return APIgetAPIGroupRequest * @http.response.details diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/ApiregistrationV1Api.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/ApiregistrationV1Api.java index 297085032c..3eab2b3b63 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/ApiregistrationV1Api.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/ApiregistrationV1Api.java @@ -1,15 +1,16 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.apis; import io.kubernetes.client.openapi.ApiCallback; @@ -38,7 +39,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import jakarta.ws.rs.core.GenericType; public class ApiregistrationV1Api { private ApiClient localVarApiClient; @@ -290,7 +290,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) thro } /** - * + * * create an APIService * @param body (required) * @return APIcreateAPIServiceRequest @@ -542,7 +542,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete an APIService * @param name name of the APIService (required) * @return APIdeleteAPIServiceRequest @@ -901,7 +901,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete collection of APIService * @return APIdeleteCollectionAPIServiceRequest * @http.response.details @@ -1051,7 +1051,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) } /** - * + * * get available resources * @return APIgetAPIResourcesRequest * @http.response.details @@ -1368,7 +1368,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) } /** - * + * * list or watch objects of kind APIService * @return APIlistAPIServiceRequest * @http.response.details @@ -1613,7 +1613,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) thro } /** - * + * * partially update the specified APIService * @param name name of the APIService (required) * @param body (required) @@ -1861,7 +1861,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) thro } /** - * + * * partially update status of the specified APIService * @param name name of the APIService (required) * @param body (required) @@ -2037,7 +2037,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) thro } /** - * + * * read the specified APIService * @param name name of the APIService (required) * @return APIreadAPIServiceRequest @@ -2211,7 +2211,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) thro } /** - * + * * read status of the specified APIService * @param name name of the APIService (required) * @return APIreadAPIServiceStatusRequest @@ -2442,7 +2442,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) thro } /** - * + * * replace the specified APIService * @param name name of the APIService (required) * @param body (required) @@ -2675,7 +2675,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) thro } /** - * + * * replace status of the specified APIService * @param name name of the APIService (required) * @param body (required) diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/ApisApi.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/ApisApi.java index 1aaf0e5a32..ebcf06f705 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/ApisApi.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/ApisApi.java @@ -1,15 +1,16 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.apis; import io.kubernetes.client.openapi.ApiCallback; @@ -33,7 +34,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import jakarta.ws.rs.core.GenericType; public class ApisApi { private ApiClient localVarApiClient; @@ -209,7 +209,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) th } /** - * + * * get available API versions * @return APIgetAPIVersionsRequest * @http.response.details diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/AppsApi.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/AppsApi.java index d4c7151f23..c6c8e0aff0 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/AppsApi.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/AppsApi.java @@ -1,15 +1,16 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.apis; import io.kubernetes.client.openapi.ApiCallback; @@ -33,7 +34,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import jakarta.ws.rs.core.GenericType; public class AppsApi { private ApiClient localVarApiClient; @@ -209,7 +209,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws } /** - * + * * get information of a group * @return APIgetAPIGroupRequest * @http.response.details diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/AppsV1Api.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/AppsV1Api.java index 4b570a7117..d4ed3ab229 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/AppsV1Api.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/AppsV1Api.java @@ -1,15 +1,16 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.apis; import io.kubernetes.client.openapi.ApiCallback; @@ -47,7 +48,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import jakarta.ws.rs.core.GenericType; public class AppsV1Api { private ApiClient localVarApiClient; @@ -307,7 +307,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callba } /** - * + * * create a ControllerRevision * @param namespace object name and auth scope, such as for teams and projects (required) * @param body (required) @@ -545,7 +545,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throw } /** - * + * * create a DaemonSet * @param namespace object name and auth scope, such as for teams and projects (required) * @param body (required) @@ -783,7 +783,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) thro } /** - * + * * create a Deployment * @param namespace object name and auth scope, such as for teams and projects (required) * @param body (required) @@ -1021,7 +1021,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) thro } /** - * + * * create a ReplicaSet * @param namespace object name and auth scope, such as for teams and projects (required) * @param body (required) @@ -1259,7 +1259,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) thr } /** - * + * * create a StatefulSet * @param namespace object name and auth scope, such as for teams and projects (required) * @param body (required) @@ -1628,7 +1628,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete collection of ControllerRevision * @param namespace object name and auth scope, such as for teams and projects (required) * @return APIdeleteCollectionNamespacedControllerRevisionRequest @@ -1994,7 +1994,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete collection of DaemonSet * @param namespace object name and auth scope, such as for teams and projects (required) * @return APIdeleteCollectionNamespacedDaemonSetRequest @@ -2360,7 +2360,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete collection of Deployment * @param namespace object name and auth scope, such as for teams and projects (required) * @return APIdeleteCollectionNamespacedDeploymentRequest @@ -2726,7 +2726,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete collection of ReplicaSet * @param namespace object name and auth scope, such as for teams and projects (required) * @return APIdeleteCollectionNamespacedReplicaSetRequest @@ -3092,7 +3092,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete collection of StatefulSet * @param namespace object name and auth scope, such as for teams and projects (required) * @return APIdeleteCollectionNamespacedStatefulSetRequest @@ -3350,7 +3350,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete a ControllerRevision * @param name name of the ControllerRevision (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -3610,7 +3610,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete a DaemonSet * @param name name of the DaemonSet (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -3870,7 +3870,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete a Deployment * @param name name of the Deployment (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -4130,7 +4130,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete a ReplicaSet * @param name name of the ReplicaSet (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -4390,7 +4390,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete a StatefulSet * @param name name of the StatefulSet (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -4543,7 +4543,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) } /** - * + * * get available resources * @return APIgetAPIResourcesRequest * @http.response.details @@ -4860,7 +4860,7 @@ public okhttp3.Call executeAsync(final ApiCallback _ca } /** - * + * * list or watch objects of kind ControllerRevision * @return APIlistControllerRevisionForAllNamespacesRequest * @http.response.details @@ -5177,7 +5177,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) t } /** - * + * * list or watch objects of kind DaemonSet * @return APIlistDaemonSetForAllNamespacesRequest * @http.response.details @@ -5494,7 +5494,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) } /** - * + * * list or watch objects of kind Deployment * @return APIlistDeploymentForAllNamespacesRequest * @http.response.details @@ -5819,7 +5819,7 @@ public okhttp3.Call executeAsync(final ApiCallback _ca } /** - * + * * list or watch objects of kind ControllerRevision * @param namespace object name and auth scope, such as for teams and projects (required) * @return APIlistNamespacedControllerRevisionRequest @@ -6145,7 +6145,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) t } /** - * + * * list or watch objects of kind DaemonSet * @param namespace object name and auth scope, such as for teams and projects (required) * @return APIlistNamespacedDaemonSetRequest @@ -6471,7 +6471,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) } /** - * + * * list or watch objects of kind Deployment * @param namespace object name and auth scope, such as for teams and projects (required) * @return APIlistNamespacedDeploymentRequest @@ -6797,7 +6797,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) } /** - * + * * list or watch objects of kind ReplicaSet * @param namespace object name and auth scope, such as for teams and projects (required) * @return APIlistNamespacedReplicaSetRequest @@ -7123,7 +7123,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) } /** - * + * * list or watch objects of kind StatefulSet * @param namespace object name and auth scope, such as for teams and projects (required) * @return APIlistNamespacedStatefulSetRequest @@ -7441,7 +7441,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) } /** - * + * * list or watch objects of kind ReplicaSet * @return APIlistReplicaSetForAllNamespacesRequest * @http.response.details @@ -7758,7 +7758,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) } /** - * + * * list or watch objects of kind StatefulSet * @return APIlistStatefulSetForAllNamespacesRequest * @http.response.details @@ -8011,7 +8011,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callba } /** - * + * * partially update the specified ControllerRevision * @param name name of the ControllerRevision (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -8268,7 +8268,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throw } /** - * + * * partially update the specified DaemonSet * @param name name of the DaemonSet (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -8525,7 +8525,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throw } /** - * + * * partially update status of the specified DaemonSet * @param name name of the DaemonSet (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -8782,7 +8782,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) thro } /** - * + * * partially update the specified Deployment * @param name name of the Deployment (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -9039,7 +9039,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Ap } /** - * + * * partially update scale of the specified Deployment * @param name name of the Scale (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -9296,7 +9296,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) thro } /** - * + * * partially update status of the specified Deployment * @param name name of the Deployment (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -9553,7 +9553,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) thro } /** - * + * * partially update the specified ReplicaSet * @param name name of the ReplicaSet (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -9810,7 +9810,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Ap } /** - * + * * partially update scale of the specified ReplicaSet * @param name name of the Scale (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -10067,7 +10067,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) thro } /** - * + * * partially update status of the specified ReplicaSet * @param name name of the ReplicaSet (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -10324,7 +10324,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) thr } /** - * + * * partially update the specified StatefulSet * @param name name of the StatefulSet (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -10581,7 +10581,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Ap } /** - * + * * partially update scale of the specified StatefulSet * @param name name of the Scale (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -10838,7 +10838,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) thr } /** - * + * * partially update status of the specified StatefulSet * @param name name of the StatefulSet (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -11023,7 +11023,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callba } /** - * + * * read the specified ControllerRevision * @param name name of the ControllerRevision (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -11206,7 +11206,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throw } /** - * + * * read the specified DaemonSet * @param name name of the DaemonSet (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -11389,7 +11389,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throw } /** - * + * * read status of the specified DaemonSet * @param name name of the DaemonSet (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -11572,7 +11572,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) thro } /** - * + * * read the specified Deployment * @param name name of the Deployment (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -11755,7 +11755,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Ap } /** - * + * * read scale of the specified Deployment * @param name name of the Scale (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -11938,7 +11938,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) thro } /** - * + * * read status of the specified Deployment * @param name name of the Deployment (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -12121,7 +12121,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) thro } /** - * + * * read the specified ReplicaSet * @param name name of the ReplicaSet (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -12304,7 +12304,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Ap } /** - * + * * read scale of the specified ReplicaSet * @param name name of the Scale (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -12487,7 +12487,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) thro } /** - * + * * read status of the specified ReplicaSet * @param name name of the ReplicaSet (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -12670,7 +12670,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) thr } /** - * + * * read the specified StatefulSet * @param name name of the StatefulSet (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -12853,7 +12853,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Ap } /** - * + * * read scale of the specified StatefulSet * @param name name of the Scale (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -13036,7 +13036,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) thr } /** - * + * * read status of the specified StatefulSet * @param name name of the StatefulSet (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -13276,7 +13276,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callba } /** - * + * * replace the specified ControllerRevision * @param name name of the ControllerRevision (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -13518,7 +13518,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throw } /** - * + * * replace the specified DaemonSet * @param name name of the DaemonSet (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -13760,7 +13760,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throw } /** - * + * * replace status of the specified DaemonSet * @param name name of the DaemonSet (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -14002,7 +14002,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) thro } /** - * + * * replace the specified Deployment * @param name name of the Deployment (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -14244,7 +14244,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Ap } /** - * + * * replace scale of the specified Deployment * @param name name of the Scale (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -14486,7 +14486,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) thro } /** - * + * * replace status of the specified Deployment * @param name name of the Deployment (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -14728,7 +14728,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) thro } /** - * + * * replace the specified ReplicaSet * @param name name of the ReplicaSet (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -14970,7 +14970,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Ap } /** - * + * * replace scale of the specified ReplicaSet * @param name name of the Scale (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -15212,7 +15212,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) thro } /** - * + * * replace status of the specified ReplicaSet * @param name name of the ReplicaSet (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -15454,7 +15454,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) thr } /** - * + * * replace the specified StatefulSet * @param name name of the StatefulSet (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -15696,7 +15696,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Ap } /** - * + * * replace scale of the specified StatefulSet * @param name name of the Scale (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -15938,7 +15938,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) thr } /** - * + * * replace status of the specified StatefulSet * @param name name of the StatefulSet (required) * @param namespace object name and auth scope, such as for teams and projects (required) diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/AuthenticationApi.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/AuthenticationApi.java index 8292025aab..91ccad4367 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/AuthenticationApi.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/AuthenticationApi.java @@ -1,15 +1,16 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.apis; import io.kubernetes.client.openapi.ApiCallback; @@ -33,7 +34,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import jakarta.ws.rs.core.GenericType; public class AuthenticationApi { private ApiClient localVarApiClient; @@ -209,7 +209,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws } /** - * + * * get information of a group * @return APIgetAPIGroupRequest * @http.response.details diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/AuthenticationV1Api.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/AuthenticationV1Api.java index 0d26749f26..c9747df77d 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/AuthenticationV1Api.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/AuthenticationV1Api.java @@ -1,15 +1,16 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.apis; import io.kubernetes.client.openapi.ApiCallback; @@ -35,7 +36,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import jakarta.ws.rs.core.GenericType; public class AuthenticationV1Api { private ApiClient localVarApiClient; @@ -287,7 +287,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callbac } /** - * + * * create a SelfSubjectReview * @param body (required) * @return APIcreateSelfSubjectReviewRequest @@ -516,7 +516,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) thr } /** - * + * * create a TokenReview * @param body (required) * @return APIcreateTokenReviewRequest @@ -669,7 +669,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) } /** - * + * * get available resources * @return APIgetAPIResourcesRequest * @http.response.details diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/AuthenticationV1alpha1Api.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/AuthenticationV1alpha1Api.java index 6804ed37b0..86126970c8 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/AuthenticationV1alpha1Api.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/AuthenticationV1alpha1Api.java @@ -1,15 +1,16 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.apis; import io.kubernetes.client.openapi.ApiCallback; @@ -34,7 +35,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import jakarta.ws.rs.core.GenericType; public class AuthenticationV1alpha1Api { private ApiClient localVarApiClient; @@ -286,7 +286,7 @@ public okhttp3.Call executeAsync(final ApiCallback _c } /** - * + * * create a SelfSubjectReview * @param body (required) * @return APIcreateSelfSubjectReviewRequest @@ -439,7 +439,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) } /** - * + * * get available resources * @return APIgetAPIResourcesRequest * @http.response.details diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/AuthenticationV1beta1Api.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/AuthenticationV1beta1Api.java index 0dbd180717..5e629f3824 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/AuthenticationV1beta1Api.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/AuthenticationV1beta1Api.java @@ -1,15 +1,16 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.apis; import io.kubernetes.client.openapi.ApiCallback; @@ -34,7 +35,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import jakarta.ws.rs.core.GenericType; public class AuthenticationV1beta1Api { private ApiClient localVarApiClient; @@ -286,7 +286,7 @@ public okhttp3.Call executeAsync(final ApiCallback _ca } /** - * + * * create a SelfSubjectReview * @param body (required) * @return APIcreateSelfSubjectReviewRequest @@ -439,7 +439,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) } /** - * + * * get available resources * @return APIgetAPIResourcesRequest * @http.response.details diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/AuthorizationApi.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/AuthorizationApi.java index 4922fb5663..63566761c4 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/AuthorizationApi.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/AuthorizationApi.java @@ -1,15 +1,16 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.apis; import io.kubernetes.client.openapi.ApiCallback; @@ -33,7 +34,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import jakarta.ws.rs.core.GenericType; public class AuthorizationApi { private ApiClient localVarApiClient; @@ -209,7 +209,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws } /** - * + * * get information of a group * @return APIgetAPIGroupRequest * @http.response.details diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/AuthorizationV1Api.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/AuthorizationV1Api.java index 11706f3798..65c23ec558 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/AuthorizationV1Api.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/AuthorizationV1Api.java @@ -1,15 +1,16 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.apis; import io.kubernetes.client.openapi.ApiCallback; @@ -37,7 +38,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import jakarta.ws.rs.core.GenericType; public class AuthorizationV1Api { private ApiClient localVarApiClient; @@ -297,7 +297,7 @@ public okhttp3.Call executeAsync(final ApiCallback _ } /** - * + * * create a LocalSubjectAccessReview * @param namespace object name and auth scope, such as for teams and projects (required) * @param body (required) @@ -527,7 +527,7 @@ public okhttp3.Call executeAsync(final ApiCallback _c } /** - * + * * create a SelfSubjectAccessReview * @param body (required) * @return APIcreateSelfSubjectAccessReviewRequest @@ -756,7 +756,7 @@ public okhttp3.Call executeAsync(final ApiCallback _ca } /** - * + * * create a SelfSubjectRulesReview * @param body (required) * @return APIcreateSelfSubjectRulesReviewRequest @@ -985,7 +985,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callb } /** - * + * * create a SubjectAccessReview * @param body (required) * @return APIcreateSubjectAccessReviewRequest @@ -1138,7 +1138,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) } /** - * + * * get available resources * @return APIgetAPIResourcesRequest * @http.response.details diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/AutoscalingApi.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/AutoscalingApi.java index bff3d3fdfa..2ac3de2653 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/AutoscalingApi.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/AutoscalingApi.java @@ -1,15 +1,16 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.apis; import io.kubernetes.client.openapi.ApiCallback; @@ -33,7 +34,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import jakarta.ws.rs.core.GenericType; public class AutoscalingApi { private ApiClient localVarApiClient; @@ -209,7 +209,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws } /** - * + * * get information of a group * @return APIgetAPIGroupRequest * @http.response.details diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/AutoscalingV1Api.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/AutoscalingV1Api.java index ea68e2e0c3..9c5055471a 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/AutoscalingV1Api.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/AutoscalingV1Api.java @@ -1,15 +1,16 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.apis; import io.kubernetes.client.openapi.ApiCallback; @@ -38,7 +39,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import jakarta.ws.rs.core.GenericType; public class AutoscalingV1Api { private ApiClient localVarApiClient; @@ -298,7 +298,7 @@ public okhttp3.Call executeAsync(final ApiCallback _c } /** - * + * * create a HorizontalPodAutoscaler * @param namespace object name and auth scope, such as for teams and projects (required) * @param body (required) @@ -667,7 +667,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete collection of HorizontalPodAutoscaler * @param namespace object name and auth scope, such as for teams and projects (required) * @return APIdeleteCollectionNamespacedHorizontalPodAutoscalerRequest @@ -925,7 +925,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete a HorizontalPodAutoscaler * @param name name of the HorizontalPodAutoscaler (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -1078,7 +1078,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) } /** - * + * * get available resources * @return APIgetAPIResourcesRequest * @http.response.details @@ -1395,7 +1395,7 @@ public okhttp3.Call executeAsync(final ApiCallback _c } /** - * + * * partially update the specified HorizontalPodAutoscaler * @param name name of the HorizontalPodAutoscaler (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -2231,7 +2231,7 @@ public okhttp3.Call executeAsync(final ApiCallback _c } /** - * + * * partially update status of the specified HorizontalPodAutoscaler * @param name name of the HorizontalPodAutoscaler (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -2416,7 +2416,7 @@ public okhttp3.Call executeAsync(final ApiCallback _c } /** - * + * * read the specified HorizontalPodAutoscaler * @param name name of the HorizontalPodAutoscaler (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -2599,7 +2599,7 @@ public okhttp3.Call executeAsync(final ApiCallback _c } /** - * + * * read status of the specified HorizontalPodAutoscaler * @param name name of the HorizontalPodAutoscaler (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -2839,7 +2839,7 @@ public okhttp3.Call executeAsync(final ApiCallback _c } /** - * + * * replace the specified HorizontalPodAutoscaler * @param name name of the HorizontalPodAutoscaler (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -3081,7 +3081,7 @@ public okhttp3.Call executeAsync(final ApiCallback _c } /** - * + * * replace status of the specified HorizontalPodAutoscaler * @param name name of the HorizontalPodAutoscaler (required) * @param namespace object name and auth scope, such as for teams and projects (required) diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/AutoscalingV2Api.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/AutoscalingV2Api.java index 0b21e682dc..be161b4ab6 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/AutoscalingV2Api.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/AutoscalingV2Api.java @@ -1,15 +1,16 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.apis; import io.kubernetes.client.openapi.ApiCallback; @@ -38,7 +39,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import jakarta.ws.rs.core.GenericType; public class AutoscalingV2Api { private ApiClient localVarApiClient; @@ -298,7 +298,7 @@ public okhttp3.Call executeAsync(final ApiCallback _c } /** - * + * * create a HorizontalPodAutoscaler * @param namespace object name and auth scope, such as for teams and projects (required) * @param body (required) @@ -667,7 +667,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete collection of HorizontalPodAutoscaler * @param namespace object name and auth scope, such as for teams and projects (required) * @return APIdeleteCollectionNamespacedHorizontalPodAutoscalerRequest @@ -925,7 +925,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete a HorizontalPodAutoscaler * @param name name of the HorizontalPodAutoscaler (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -1078,7 +1078,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) } /** - * + * * get available resources * @return APIgetAPIResourcesRequest * @http.response.details @@ -1395,7 +1395,7 @@ public okhttp3.Call executeAsync(final ApiCallback _c } /** - * + * * partially update the specified HorizontalPodAutoscaler * @param name name of the HorizontalPodAutoscaler (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -2231,7 +2231,7 @@ public okhttp3.Call executeAsync(final ApiCallback _c } /** - * + * * partially update status of the specified HorizontalPodAutoscaler * @param name name of the HorizontalPodAutoscaler (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -2416,7 +2416,7 @@ public okhttp3.Call executeAsync(final ApiCallback _c } /** - * + * * read the specified HorizontalPodAutoscaler * @param name name of the HorizontalPodAutoscaler (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -2599,7 +2599,7 @@ public okhttp3.Call executeAsync(final ApiCallback _c } /** - * + * * read status of the specified HorizontalPodAutoscaler * @param name name of the HorizontalPodAutoscaler (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -2839,7 +2839,7 @@ public okhttp3.Call executeAsync(final ApiCallback _c } /** - * + * * replace the specified HorizontalPodAutoscaler * @param name name of the HorizontalPodAutoscaler (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -3081,7 +3081,7 @@ public okhttp3.Call executeAsync(final ApiCallback _c } /** - * + * * replace status of the specified HorizontalPodAutoscaler * @param name name of the HorizontalPodAutoscaler (required) * @param namespace object name and auth scope, such as for teams and projects (required) diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/BatchApi.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/BatchApi.java index f78a845539..b9b1692e22 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/BatchApi.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/BatchApi.java @@ -1,15 +1,16 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.apis; import io.kubernetes.client.openapi.ApiCallback; @@ -33,7 +34,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import jakarta.ws.rs.core.GenericType; public class BatchApi { private ApiClient localVarApiClient; @@ -209,7 +209,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws } /** - * + * * get information of a group * @return APIgetAPIGroupRequest * @http.response.details diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/BatchV1Api.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/BatchV1Api.java index 202e5378e1..33fbfda7e2 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/BatchV1Api.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/BatchV1Api.java @@ -1,15 +1,16 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.apis; import io.kubernetes.client.openapi.ApiCallback; @@ -40,7 +41,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import jakarta.ws.rs.core.GenericType; public class BatchV1Api { private ApiClient localVarApiClient; @@ -300,7 +300,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws } /** - * + * * create a CronJob * @param namespace object name and auth scope, such as for teams and projects (required) * @param body (required) @@ -538,7 +538,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiE } /** - * + * * create a Job * @param namespace object name and auth scope, such as for teams and projects (required) * @param body (required) @@ -907,7 +907,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete collection of CronJob * @param namespace object name and auth scope, such as for teams and projects (required) * @return APIdeleteCollectionNamespacedCronJobRequest @@ -1273,7 +1273,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete collection of Job * @param namespace object name and auth scope, such as for teams and projects (required) * @return APIdeleteCollectionNamespacedJobRequest @@ -1531,7 +1531,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete a CronJob * @param name name of the CronJob (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -1791,7 +1791,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete a Job * @param name name of the Job (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -1944,7 +1944,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) } /** - * + * * get available resources * @return APIgetAPIResourcesRequest * @http.response.details @@ -2261,7 +2261,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) thr } /** - * + * * list or watch objects of kind CronJob * @return APIlistCronJobForAllNamespacesRequest * @http.response.details @@ -2578,7 +2578,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws } /** - * + * * list or watch objects of kind Job * @return APIlistJobForAllNamespacesRequest * @http.response.details @@ -2903,7 +2903,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) thr } /** - * + * * list or watch objects of kind CronJob * @param namespace object name and auth scope, such as for teams and projects (required) * @return APIlistNamespacedCronJobRequest @@ -3229,7 +3229,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws } /** - * + * * list or watch objects of kind Job * @param namespace object name and auth scope, such as for teams and projects (required) * @return APIlistNamespacedJobRequest @@ -3483,7 +3483,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws } /** - * + * * partially update the specified CronJob * @param name name of the CronJob (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -3740,7 +3740,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws } /** - * + * * partially update status of the specified CronJob * @param name name of the CronJob (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -3997,7 +3997,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiE } /** - * + * * partially update the specified Job * @param name name of the Job (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -4254,7 +4254,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiE } /** - * + * * partially update status of the specified Job * @param name name of the Job (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -4439,7 +4439,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws } /** - * + * * read the specified CronJob * @param name name of the CronJob (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -4622,7 +4622,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws } /** - * + * * read status of the specified CronJob * @param name name of the CronJob (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -4805,7 +4805,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiE } /** - * + * * read the specified Job * @param name name of the Job (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -4988,7 +4988,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiE } /** - * + * * read status of the specified Job * @param name name of the Job (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -5228,7 +5228,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws } /** - * + * * replace the specified CronJob * @param name name of the CronJob (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -5470,7 +5470,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws } /** - * + * * replace status of the specified CronJob * @param name name of the CronJob (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -5712,7 +5712,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiE } /** - * + * * replace the specified Job * @param name name of the Job (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -5954,7 +5954,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiE } /** - * + * * replace status of the specified Job * @param name name of the Job (required) * @param namespace object name and auth scope, such as for teams and projects (required) diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/CertificatesApi.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/CertificatesApi.java index 6baed45ef5..068e52f811 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/CertificatesApi.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/CertificatesApi.java @@ -1,15 +1,16 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.apis; import io.kubernetes.client.openapi.ApiCallback; @@ -33,7 +34,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import jakarta.ws.rs.core.GenericType; public class CertificatesApi { private ApiClient localVarApiClient; @@ -209,7 +209,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws } /** - * + * * get information of a group * @return APIgetAPIGroupRequest * @http.response.details diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/CertificatesV1Api.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/CertificatesV1Api.java index 29bf5cd590..7fcd1b5e30 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/CertificatesV1Api.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/CertificatesV1Api.java @@ -1,15 +1,16 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.apis; import io.kubernetes.client.openapi.ApiCallback; @@ -38,7 +39,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import jakarta.ws.rs.core.GenericType; public class CertificatesV1Api { private ApiClient localVarApiClient; @@ -290,7 +290,7 @@ public okhttp3.Call executeAsync(final ApiCallback } /** - * + * * create a CertificateSigningRequest * @param body (required) * @return APIcreateCertificateSigningRequestRequest @@ -542,7 +542,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete a CertificateSigningRequest * @param name name of the CertificateSigningRequest (required) * @return APIdeleteCertificateSigningRequestRequest @@ -901,7 +901,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete collection of CertificateSigningRequest * @return APIdeleteCollectionCertificateSigningRequestRequest * @http.response.details @@ -1051,7 +1051,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) } /** - * + * * get available resources * @return APIgetAPIResourcesRequest * @http.response.details @@ -1368,7 +1368,7 @@ public okhttp3.Call executeAsync(final ApiCallback } /** - * + * * partially update the specified CertificateSigningRequest * @param name name of the CertificateSigningRequest (required) * @param body (required) @@ -1861,7 +1861,7 @@ public okhttp3.Call executeAsync(final ApiCallback } /** - * + * * partially update approval of the specified CertificateSigningRequest * @param name name of the CertificateSigningRequest (required) * @param body (required) @@ -2109,7 +2109,7 @@ public okhttp3.Call executeAsync(final ApiCallback } /** - * + * * partially update status of the specified CertificateSigningRequest * @param name name of the CertificateSigningRequest (required) * @param body (required) @@ -2285,7 +2285,7 @@ public okhttp3.Call executeAsync(final ApiCallback } /** - * + * * read the specified CertificateSigningRequest * @param name name of the CertificateSigningRequest (required) * @return APIreadCertificateSigningRequestRequest @@ -2459,7 +2459,7 @@ public okhttp3.Call executeAsync(final ApiCallback } /** - * + * * read approval of the specified CertificateSigningRequest * @param name name of the CertificateSigningRequest (required) * @return APIreadCertificateSigningRequestApprovalRequest @@ -2633,7 +2633,7 @@ public okhttp3.Call executeAsync(final ApiCallback } /** - * + * * read status of the specified CertificateSigningRequest * @param name name of the CertificateSigningRequest (required) * @return APIreadCertificateSigningRequestStatusRequest @@ -2864,7 +2864,7 @@ public okhttp3.Call executeAsync(final ApiCallback } /** - * + * * replace the specified CertificateSigningRequest * @param name name of the CertificateSigningRequest (required) * @param body (required) @@ -3097,7 +3097,7 @@ public okhttp3.Call executeAsync(final ApiCallback } /** - * + * * replace approval of the specified CertificateSigningRequest * @param name name of the CertificateSigningRequest (required) * @param body (required) @@ -3330,7 +3330,7 @@ public okhttp3.Call executeAsync(final ApiCallback } /** - * + * * replace status of the specified CertificateSigningRequest * @param name name of the CertificateSigningRequest (required) * @param body (required) diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/CertificatesV1alpha1Api.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/CertificatesV1alpha1Api.java index 113227d450..707ca5f3d0 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/CertificatesV1alpha1Api.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/CertificatesV1alpha1Api.java @@ -1,15 +1,16 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.apis; import io.kubernetes.client.openapi.ApiCallback; @@ -38,7 +39,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import jakarta.ws.rs.core.GenericType; public class CertificatesV1alpha1Api { private ApiClient localVarApiClient; @@ -290,7 +290,7 @@ public okhttp3.Call executeAsync(final ApiCallback _ } /** - * + * * create a ClusterTrustBundle * @param body (required) * @return APIcreateClusterTrustBundleRequest @@ -542,7 +542,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete a ClusterTrustBundle * @param name name of the ClusterTrustBundle (required) * @return APIdeleteClusterTrustBundleRequest @@ -901,7 +901,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete collection of ClusterTrustBundle * @return APIdeleteCollectionClusterTrustBundleRequest * @http.response.details @@ -1051,7 +1051,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) } /** - * + * * get available resources * @return APIgetAPIResourcesRequest * @http.response.details @@ -1368,7 +1368,7 @@ public okhttp3.Call executeAsync(final ApiCallback _ } /** - * + * * partially update the specified ClusterTrustBundle * @param name name of the ClusterTrustBundle (required) * @param body (required) @@ -1789,7 +1789,7 @@ public okhttp3.Call executeAsync(final ApiCallback _ } /** - * + * * read the specified ClusterTrustBundle * @param name name of the ClusterTrustBundle (required) * @return APIreadClusterTrustBundleRequest @@ -2020,7 +2020,7 @@ public okhttp3.Call executeAsync(final ApiCallback _ } /** - * + * * replace the specified ClusterTrustBundle * @param name name of the ClusterTrustBundle (required) * @param body (required) diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/CoordinationApi.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/CoordinationApi.java index 4a1626d59e..2739873249 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/CoordinationApi.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/CoordinationApi.java @@ -1,15 +1,16 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.apis; import io.kubernetes.client.openapi.ApiCallback; @@ -33,7 +34,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import jakarta.ws.rs.core.GenericType; public class CoordinationApi { private ApiClient localVarApiClient; @@ -209,7 +209,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws } /** - * + * * get information of a group * @return APIgetAPIGroupRequest * @http.response.details diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/CoordinationV1Api.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/CoordinationV1Api.java index af52be53c1..fc05e10427 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/CoordinationV1Api.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/CoordinationV1Api.java @@ -1,15 +1,16 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.apis; import io.kubernetes.client.openapi.ApiCallback; @@ -38,7 +39,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import jakarta.ws.rs.core.GenericType; public class CoordinationV1Api { private ApiClient localVarApiClient; @@ -298,7 +298,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Ap } /** - * + * * create a Lease * @param namespace object name and auth scope, such as for teams and projects (required) * @param body (required) @@ -667,7 +667,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete collection of Lease * @param namespace object name and auth scope, such as for teams and projects (required) * @return APIdeleteCollectionNamespacedLeaseRequest @@ -925,7 +925,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete a Lease * @param name name of the Lease (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -1078,7 +1078,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) } /** - * + * * get available resources * @return APIgetAPIResourcesRequest * @http.response.details @@ -1395,7 +1395,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throw } /** - * + * * list or watch objects of kind Lease * @return APIlistLeaseForAllNamespacesRequest * @http.response.details @@ -1720,7 +1720,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throw } /** - * + * * list or watch objects of kind Lease * @param namespace object name and auth scope, such as for teams and projects (required) * @return APIlistNamespacedLeaseRequest @@ -1974,7 +1974,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Ap } /** - * + * * partially update the specified Lease * @param name name of the Lease (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -2159,7 +2159,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Ap } /** - * + * * read the specified Lease * @param name name of the Lease (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -2399,7 +2399,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Ap } /** - * + * * replace the specified Lease * @param name name of the Lease (required) * @param namespace object name and auth scope, such as for teams and projects (required) diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/CoreApi.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/CoreApi.java index 882a7b0618..af8070e2d3 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/CoreApi.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/CoreApi.java @@ -1,15 +1,16 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.apis; import io.kubernetes.client.openapi.ApiCallback; @@ -33,7 +34,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import jakarta.ws.rs.core.GenericType; public class CoreApi { private ApiClient localVarApiClient; @@ -209,7 +209,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) thr } /** - * + * * get available API versions * @return APIgetAPIVersionsRequest * @http.response.details diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/CoreV1Api.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/CoreV1Api.java index 87057b79cf..497365f252 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/CoreV1Api.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/CoreV1Api.java @@ -1,15 +1,16 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.apis; import io.kubernetes.client.openapi.ApiCallback; @@ -72,7 +73,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import jakarta.ws.rs.core.GenericType; public class CoreV1Api { private ApiClient localVarApiClient; @@ -277,7 +277,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * connect DELETE requests to proxy of Pod * @param name name of the PodProxyOptions (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -466,7 +466,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * connect DELETE requests to proxy of Pod * @param name name of the PodProxyOptions (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -648,7 +648,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * connect DELETE requests to proxy of Service * @param name name of the ServiceProxyOptions (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -837,7 +837,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * connect DELETE requests to proxy of Service * @param name name of the ServiceProxyOptions (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -1011,7 +1011,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * connect DELETE requests to proxy of Node * @param name name of the NodeProxyOptions (required) * @return APIconnectDeleteNodeProxyRequest @@ -1191,7 +1191,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * connect DELETE requests to proxy of Node * @param name name of the NodeProxyOptions (required) * @param path path to the resource (required) @@ -1432,7 +1432,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * connect GET requests to attach of Pod * @param name name of the PodAttachOptions (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -1688,7 +1688,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * connect GET requests to exec of Pod * @param name name of the PodExecOptions (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -1869,7 +1869,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * connect GET requests to portforward of Pod * @param name name of the PodPortForwardOptions (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -2050,7 +2050,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * connect GET requests to proxy of Pod * @param name name of the PodProxyOptions (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -2239,7 +2239,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * connect GET requests to proxy of Pod * @param name name of the PodProxyOptions (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -2421,7 +2421,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * connect GET requests to proxy of Service * @param name name of the ServiceProxyOptions (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -2610,7 +2610,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * connect GET requests to proxy of Service * @param name name of the ServiceProxyOptions (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -2784,7 +2784,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * connect GET requests to proxy of Node * @param name name of the NodeProxyOptions (required) * @return APIconnectGetNodeProxyRequest @@ -2964,7 +2964,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * connect GET requests to proxy of Node * @param name name of the NodeProxyOptions (required) * @param path path to the resource (required) @@ -3145,7 +3145,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * connect HEAD requests to proxy of Pod * @param name name of the PodProxyOptions (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -3334,7 +3334,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * connect HEAD requests to proxy of Pod * @param name name of the PodProxyOptions (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -3516,7 +3516,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * connect HEAD requests to proxy of Service * @param name name of the ServiceProxyOptions (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -3705,7 +3705,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * connect HEAD requests to proxy of Service * @param name name of the ServiceProxyOptions (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -3879,7 +3879,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * connect HEAD requests to proxy of Node * @param name name of the NodeProxyOptions (required) * @return APIconnectHeadNodeProxyRequest @@ -4059,7 +4059,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * connect HEAD requests to proxy of Node * @param name name of the NodeProxyOptions (required) * @param path path to the resource (required) @@ -4240,7 +4240,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * connect OPTIONS requests to proxy of Pod * @param name name of the PodProxyOptions (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -4429,7 +4429,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * connect OPTIONS requests to proxy of Pod * @param name name of the PodProxyOptions (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -4611,7 +4611,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * connect OPTIONS requests to proxy of Service * @param name name of the ServiceProxyOptions (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -4800,7 +4800,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * connect OPTIONS requests to proxy of Service * @param name name of the ServiceProxyOptions (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -4974,7 +4974,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * connect OPTIONS requests to proxy of Node * @param name name of the NodeProxyOptions (required) * @return APIconnectOptionsNodeProxyRequest @@ -5154,7 +5154,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * connect OPTIONS requests to proxy of Node * @param name name of the NodeProxyOptions (required) * @param path path to the resource (required) @@ -5335,7 +5335,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * connect PATCH requests to proxy of Pod * @param name name of the PodProxyOptions (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -5524,7 +5524,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * connect PATCH requests to proxy of Pod * @param name name of the PodProxyOptions (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -5706,7 +5706,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * connect PATCH requests to proxy of Service * @param name name of the ServiceProxyOptions (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -5895,7 +5895,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * connect PATCH requests to proxy of Service * @param name name of the ServiceProxyOptions (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -6069,7 +6069,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * connect PATCH requests to proxy of Node * @param name name of the NodeProxyOptions (required) * @return APIconnectPatchNodeProxyRequest @@ -6249,7 +6249,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * connect PATCH requests to proxy of Node * @param name name of the NodeProxyOptions (required) * @param path path to the resource (required) @@ -6490,7 +6490,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * connect POST requests to attach of Pod * @param name name of the PodAttachOptions (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -6746,7 +6746,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * connect POST requests to exec of Pod * @param name name of the PodExecOptions (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -6927,7 +6927,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * connect POST requests to portforward of Pod * @param name name of the PodPortForwardOptions (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -7108,7 +7108,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * connect POST requests to proxy of Pod * @param name name of the PodProxyOptions (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -7297,7 +7297,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * connect POST requests to proxy of Pod * @param name name of the PodProxyOptions (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -7479,7 +7479,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * connect POST requests to proxy of Service * @param name name of the ServiceProxyOptions (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -7668,7 +7668,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * connect POST requests to proxy of Service * @param name name of the ServiceProxyOptions (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -7842,7 +7842,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * connect POST requests to proxy of Node * @param name name of the NodeProxyOptions (required) * @return APIconnectPostNodeProxyRequest @@ -8022,7 +8022,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * connect POST requests to proxy of Node * @param name name of the NodeProxyOptions (required) * @param path path to the resource (required) @@ -8203,7 +8203,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * connect PUT requests to proxy of Pod * @param name name of the PodProxyOptions (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -8392,7 +8392,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * connect PUT requests to proxy of Pod * @param name name of the PodProxyOptions (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -8574,7 +8574,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * connect PUT requests to proxy of Service * @param name name of the ServiceProxyOptions (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -8763,7 +8763,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * connect PUT requests to proxy of Service * @param name name of the ServiceProxyOptions (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -8937,7 +8937,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * connect PUT requests to proxy of Node * @param name name of the NodeProxyOptions (required) * @return APIconnectPutNodeProxyRequest @@ -9117,7 +9117,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * connect PUT requests to proxy of Node * @param name name of the NodeProxyOptions (required) * @param path path to the resource (required) @@ -9345,7 +9345,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throw } /** - * + * * create a Namespace * @param body (required) * @return APIcreateNamespaceRequest @@ -9582,7 +9582,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws } /** - * + * * create a Binding * @param namespace object name and auth scope, such as for teams and projects (required) * @param body (required) @@ -9820,7 +9820,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throw } /** - * + * * create a ConfigMap * @param namespace object name and auth scope, such as for teams and projects (required) * @param body (required) @@ -10058,7 +10058,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throw } /** - * + * * create Endpoints * @param namespace object name and auth scope, such as for teams and projects (required) * @param body (required) @@ -10296,7 +10296,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throw } /** - * + * * create an Event * @param namespace object name and auth scope, such as for teams and projects (required) * @param body (required) @@ -10534,7 +10534,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) thro } /** - * + * * create a LimitRange * @param namespace object name and auth scope, such as for teams and projects (required) * @param body (required) @@ -10772,7 +10772,7 @@ public okhttp3.Call executeAsync(final ApiCallback _cal } /** - * + * * create a PersistentVolumeClaim * @param namespace object name and auth scope, such as for teams and projects (required) * @param body (required) @@ -11010,7 +11010,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiE } /** - * + * * create a Pod * @param namespace object name and auth scope, such as for teams and projects (required) * @param body (required) @@ -11256,7 +11256,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws } /** - * + * * create binding of a Pod * @param name name of the Binding (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -11503,7 +11503,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws } /** - * + * * create eviction of a Pod * @param name name of the Eviction (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -11742,7 +11742,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) thr } /** - * + * * create a PodTemplate * @param namespace object name and auth scope, such as for teams and projects (required) * @param body (required) @@ -11980,7 +11980,7 @@ public okhttp3.Call executeAsync(final ApiCallback _cal } /** - * + * * create a ReplicationController * @param namespace object name and auth scope, such as for teams and projects (required) * @param body (required) @@ -12218,7 +12218,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) t } /** - * + * * create a ResourceQuota * @param namespace object name and auth scope, such as for teams and projects (required) * @param body (required) @@ -12456,7 +12456,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * create a Secret * @param namespace object name and auth scope, such as for teams and projects (required) * @param body (required) @@ -12694,7 +12694,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws } /** - * + * * create a Service * @param namespace object name and auth scope, such as for teams and projects (required) * @param body (required) @@ -12932,7 +12932,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) } /** - * + * * create a ServiceAccount * @param namespace object name and auth scope, such as for teams and projects (required) * @param body (required) @@ -13178,7 +13178,7 @@ public okhttp3.Call executeAsync(final ApiCallback } /** - * + * * create token of a ServiceAccount * @param name name of the TokenRequest (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -13409,7 +13409,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * create a Node * @param body (required) * @return APIcreateNodeRequest @@ -13638,7 +13638,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback } /** - * + * * create a PersistentVolume * @param body (required) * @return APIcreatePersistentVolumeRequest @@ -14006,7 +14006,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete collection of ConfigMap * @param namespace object name and auth scope, such as for teams and projects (required) * @return APIdeleteCollectionNamespacedConfigMapRequest @@ -14372,7 +14372,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete collection of Endpoints * @param namespace object name and auth scope, such as for teams and projects (required) * @return APIdeleteCollectionNamespacedEndpointsRequest @@ -14738,7 +14738,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete collection of Event * @param namespace object name and auth scope, such as for teams and projects (required) * @return APIdeleteCollectionNamespacedEventRequest @@ -15104,7 +15104,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete collection of LimitRange * @param namespace object name and auth scope, such as for teams and projects (required) * @return APIdeleteCollectionNamespacedLimitRangeRequest @@ -15470,7 +15470,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete collection of PersistentVolumeClaim * @param namespace object name and auth scope, such as for teams and projects (required) * @return APIdeleteCollectionNamespacedPersistentVolumeClaimRequest @@ -15836,7 +15836,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete collection of Pod * @param namespace object name and auth scope, such as for teams and projects (required) * @return APIdeleteCollectionNamespacedPodRequest @@ -16202,7 +16202,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete collection of PodTemplate * @param namespace object name and auth scope, such as for teams and projects (required) * @return APIdeleteCollectionNamespacedPodTemplateRequest @@ -16568,7 +16568,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete collection of ReplicationController * @param namespace object name and auth scope, such as for teams and projects (required) * @return APIdeleteCollectionNamespacedReplicationControllerRequest @@ -16934,7 +16934,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete collection of ResourceQuota * @param namespace object name and auth scope, such as for teams and projects (required) * @return APIdeleteCollectionNamespacedResourceQuotaRequest @@ -17300,7 +17300,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete collection of Secret * @param namespace object name and auth scope, such as for teams and projects (required) * @return APIdeleteCollectionNamespacedSecretRequest @@ -17666,7 +17666,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete collection of Service * @param namespace object name and auth scope, such as for teams and projects (required) * @return APIdeleteCollectionNamespacedServiceRequest @@ -18032,7 +18032,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete collection of ServiceAccount * @param namespace object name and auth scope, such as for teams and projects (required) * @return APIdeleteCollectionNamespacedServiceAccountRequest @@ -18390,7 +18390,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete collection of Node * @return APIdeleteCollectionNodeRequest * @http.response.details @@ -18747,7 +18747,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete collection of PersistentVolume * @return APIdeleteCollectionPersistentVolumeRequest * @http.response.details @@ -18996,7 +18996,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete a Namespace * @param name name of the Namespace (required) * @return APIdeleteNamespaceRequest @@ -19255,7 +19255,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete a ConfigMap * @param name name of the ConfigMap (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -19515,7 +19515,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete Endpoints * @param name name of the Endpoints (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -19775,7 +19775,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete an Event * @param name name of the Event (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -20035,7 +20035,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete a LimitRange * @param name name of the LimitRange (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -20295,7 +20295,7 @@ public okhttp3.Call executeAsync(final ApiCallback _cal } /** - * + * * delete a PersistentVolumeClaim * @param name name of the PersistentVolumeClaim (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -20555,7 +20555,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiE } /** - * + * * delete a Pod * @param name name of the Pod (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -20815,7 +20815,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) thr } /** - * + * * delete a PodTemplate * @param name name of the PodTemplate (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -21075,7 +21075,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete a ReplicationController * @param name name of the ReplicationController (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -21335,7 +21335,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) t } /** - * + * * delete a ResourceQuota * @param name name of the ResourceQuota (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -21595,7 +21595,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete a Secret * @param name name of the Secret (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -21855,7 +21855,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws } /** - * + * * delete a Service * @param name name of the Service (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -22115,7 +22115,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) } /** - * + * * delete a ServiceAccount * @param name name of the ServiceAccount (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -22367,7 +22367,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete a Node * @param name name of the Node (required) * @return APIdeleteNodeRequest @@ -22618,7 +22618,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback } /** - * + * * delete a PersistentVolume * @param name name of the PersistentVolume (required) * @return APIdeletePersistentVolumeRequest @@ -22770,7 +22770,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) } /** - * + * * get available resources * @return APIgetAPIResourcesRequest * @http.response.details @@ -23087,7 +23087,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callb } /** - * + * * list objects of kind ComponentStatus * @return APIlistComponentStatusRequest * @http.response.details @@ -23404,7 +23404,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) t } /** - * + * * list or watch objects of kind ConfigMap * @return APIlistConfigMapForAllNamespacesRequest * @http.response.details @@ -23721,7 +23721,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) t } /** - * + * * list or watch objects of kind Endpoints * @return APIlistEndpointsForAllNamespacesRequest * @http.response.details @@ -24038,7 +24038,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) t } /** - * + * * list or watch objects of kind Event * @return APIlistEventForAllNamespacesRequest * @http.response.details @@ -24355,7 +24355,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) } /** - * + * * list or watch objects of kind LimitRange * @return APIlistLimitRangeForAllNamespacesRequest * @http.response.details @@ -24672,7 +24672,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) t } /** - * + * * list or watch objects of kind Namespace * @return APIlistNamespaceRequest * @http.response.details @@ -24997,7 +24997,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) t } /** - * + * * list or watch objects of kind ConfigMap * @param namespace object name and auth scope, such as for teams and projects (required) * @return APIlistNamespacedConfigMapRequest @@ -25323,7 +25323,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) t } /** - * + * * list or watch objects of kind Endpoints * @param namespace object name and auth scope, such as for teams and projects (required) * @return APIlistNamespacedEndpointsRequest @@ -25649,7 +25649,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) t } /** - * + * * list or watch objects of kind Event * @param namespace object name and auth scope, such as for teams and projects (required) * @return APIlistNamespacedEventRequest @@ -25975,7 +25975,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) } /** - * + * * list or watch objects of kind LimitRange * @param namespace object name and auth scope, such as for teams and projects (required) * @return APIlistNamespacedLimitRangeRequest @@ -26301,7 +26301,7 @@ public okhttp3.Call executeAsync(final ApiCallback } /** - * + * * list or watch objects of kind PersistentVolumeClaim * @param namespace object name and auth scope, such as for teams and projects (required) * @return APIlistNamespacedPersistentVolumeClaimRequest @@ -26627,7 +26627,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws } /** - * + * * list or watch objects of kind Pod * @param namespace object name and auth scope, such as for teams and projects (required) * @return APIlistNamespacedPodRequest @@ -26953,7 +26953,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) } /** - * + * * list or watch objects of kind PodTemplate * @param namespace object name and auth scope, such as for teams and projects (required) * @return APIlistNamespacedPodTemplateRequest @@ -27279,7 +27279,7 @@ public okhttp3.Call executeAsync(final ApiCallback } /** - * + * * list or watch objects of kind ReplicationController * @param namespace object name and auth scope, such as for teams and projects (required) * @return APIlistNamespacedReplicationControllerRequest @@ -27605,7 +27605,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callbac } /** - * + * * list or watch objects of kind ResourceQuota * @param namespace object name and auth scope, such as for teams and projects (required) * @return APIlistNamespacedResourceQuotaRequest @@ -27931,7 +27931,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) thro } /** - * + * * list or watch objects of kind Secret * @param namespace object name and auth scope, such as for teams and projects (required) * @return APIlistNamespacedSecretRequest @@ -28257,7 +28257,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) thr } /** - * + * * list or watch objects of kind Service * @param namespace object name and auth scope, such as for teams and projects (required) * @return APIlistNamespacedServiceRequest @@ -28583,7 +28583,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callba } /** - * + * * list or watch objects of kind ServiceAccount * @param namespace object name and auth scope, such as for teams and projects (required) * @return APIlistNamespacedServiceAccountRequest @@ -28901,7 +28901,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws } /** - * + * * list or watch objects of kind Node * @return APIlistNodeRequest * @http.response.details @@ -29218,7 +29218,7 @@ public okhttp3.Call executeAsync(final ApiCallback _call } /** - * + * * list or watch objects of kind PersistentVolume * @return APIlistPersistentVolumeRequest * @http.response.details @@ -29535,7 +29535,7 @@ public okhttp3.Call executeAsync(final ApiCallback } /** - * + * * list or watch objects of kind PersistentVolumeClaim * @return APIlistPersistentVolumeClaimForAllNamespacesRequest * @http.response.details @@ -29852,7 +29852,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws } /** - * + * * list or watch objects of kind Pod * @return APIlistPodForAllNamespacesRequest * @http.response.details @@ -30169,7 +30169,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) } /** - * + * * list or watch objects of kind PodTemplate * @return APIlistPodTemplateForAllNamespacesRequest * @http.response.details @@ -30486,7 +30486,7 @@ public okhttp3.Call executeAsync(final ApiCallback } /** - * + * * list or watch objects of kind ReplicationController * @return APIlistReplicationControllerForAllNamespacesRequest * @http.response.details @@ -30803,7 +30803,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callbac } /** - * + * * list or watch objects of kind ResourceQuota * @return APIlistResourceQuotaForAllNamespacesRequest * @http.response.details @@ -31120,7 +31120,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) thro } /** - * + * * list or watch objects of kind Secret * @return APIlistSecretForAllNamespacesRequest * @http.response.details @@ -31437,7 +31437,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callba } /** - * + * * list or watch objects of kind ServiceAccount * @return APIlistServiceAccountForAllNamespacesRequest * @http.response.details @@ -31754,7 +31754,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) thr } /** - * + * * list or watch objects of kind Service * @return APIlistServiceForAllNamespacesRequest * @http.response.details @@ -31999,7 +31999,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throw } /** - * + * * partially update the specified Namespace * @param name name of the Namespace (required) * @param body (required) @@ -32247,7 +32247,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throw } /** - * + * * partially update status of the specified Namespace * @param name name of the Namespace (required) * @param body (required) @@ -32503,7 +32503,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throw } /** - * + * * partially update the specified ConfigMap * @param name name of the ConfigMap (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -32760,7 +32760,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throw } /** - * + * * partially update the specified Endpoints * @param name name of the Endpoints (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -33017,7 +33017,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throw } /** - * + * * partially update the specified Event * @param name name of the Event (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -33274,7 +33274,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) thro } /** - * + * * partially update the specified LimitRange * @param name name of the LimitRange (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -33531,7 +33531,7 @@ public okhttp3.Call executeAsync(final ApiCallback _cal } /** - * + * * partially update the specified PersistentVolumeClaim * @param name name of the PersistentVolumeClaim (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -33788,7 +33788,7 @@ public okhttp3.Call executeAsync(final ApiCallback _cal } /** - * + * * partially update status of the specified PersistentVolumeClaim * @param name name of the PersistentVolumeClaim (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -34045,7 +34045,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiE } /** - * + * * partially update the specified Pod * @param name name of the Pod (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -34302,7 +34302,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiE } /** - * + * * partially update ephemeralcontainers of the specified Pod * @param name name of the Pod (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -34559,7 +34559,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiE } /** - * + * * partially update status of the specified Pod * @param name name of the Pod (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -34816,7 +34816,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) thr } /** - * + * * partially update the specified PodTemplate * @param name name of the PodTemplate (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -35073,7 +35073,7 @@ public okhttp3.Call executeAsync(final ApiCallback _cal } /** - * + * * partially update the specified ReplicationController * @param name name of the ReplicationController (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -35330,7 +35330,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Ap } /** - * + * * partially update scale of the specified ReplicationController * @param name name of the Scale (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -35587,7 +35587,7 @@ public okhttp3.Call executeAsync(final ApiCallback _cal } /** - * + * * partially update status of the specified ReplicationController * @param name name of the ReplicationController (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -35844,7 +35844,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) t } /** - * + * * partially update the specified ResourceQuota * @param name name of the ResourceQuota (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -36101,7 +36101,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) t } /** - * + * * partially update status of the specified ResourceQuota * @param name name of the ResourceQuota (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -36358,7 +36358,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * partially update the specified Secret * @param name name of the Secret (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -36615,7 +36615,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws } /** - * + * * partially update the specified Service * @param name name of the Service (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -36872,7 +36872,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) } /** - * + * * partially update the specified ServiceAccount * @param name name of the ServiceAccount (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -37129,7 +37129,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws } /** - * + * * partially update status of the specified Service * @param name name of the Service (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -37378,7 +37378,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * partially update the specified Node * @param name name of the Node (required) * @param body (required) @@ -37626,7 +37626,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * partially update status of the specified Node * @param name name of the Node (required) * @param body (required) @@ -37874,7 +37874,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback } /** - * + * * partially update the specified PersistentVolume * @param name name of the PersistentVolume (required) * @param body (required) @@ -38122,7 +38122,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback } /** - * + * * partially update status of the specified PersistentVolume * @param name name of the PersistentVolume (required) * @param body (required) @@ -38298,7 +38298,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) } /** - * + * * read the specified ComponentStatus * @param name name of the ComponentStatus (required) * @return APIreadComponentStatusRequest @@ -38472,7 +38472,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throw } /** - * + * * read the specified Namespace * @param name name of the Namespace (required) * @return APIreadNamespaceRequest @@ -38646,7 +38646,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throw } /** - * + * * read status of the specified Namespace * @param name name of the Namespace (required) * @return APIreadNamespaceStatusRequest @@ -38828,7 +38828,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throw } /** - * + * * read the specified ConfigMap * @param name name of the ConfigMap (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -39011,7 +39011,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throw } /** - * + * * read the specified Endpoints * @param name name of the Endpoints (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -39194,7 +39194,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throw } /** - * + * * read the specified Event * @param name name of the Event (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -39377,7 +39377,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) thro } /** - * + * * read the specified LimitRange * @param name name of the LimitRange (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -39560,7 +39560,7 @@ public okhttp3.Call executeAsync(final ApiCallback _cal } /** - * + * * read the specified PersistentVolumeClaim * @param name name of the PersistentVolumeClaim (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -39743,7 +39743,7 @@ public okhttp3.Call executeAsync(final ApiCallback _cal } /** - * + * * read status of the specified PersistentVolumeClaim * @param name name of the PersistentVolumeClaim (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -39926,7 +39926,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiE } /** - * + * * read the specified Pod * @param name name of the Pod (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -40109,7 +40109,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiE } /** - * + * * read ephemeralcontainers of the specified Pod * @param name name of the Pod (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -40413,7 +40413,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * read log of the specified Pod * @param name name of the Pod (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -40596,7 +40596,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiE } /** - * + * * read status of the specified Pod * @param name name of the Pod (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -40779,7 +40779,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) thr } /** - * + * * read the specified PodTemplate * @param name name of the PodTemplate (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -40962,7 +40962,7 @@ public okhttp3.Call executeAsync(final ApiCallback _cal } /** - * + * * read the specified ReplicationController * @param name name of the ReplicationController (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -41145,7 +41145,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Ap } /** - * + * * read scale of the specified ReplicationController * @param name name of the Scale (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -41328,7 +41328,7 @@ public okhttp3.Call executeAsync(final ApiCallback _cal } /** - * + * * read status of the specified ReplicationController * @param name name of the ReplicationController (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -41511,7 +41511,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) t } /** - * + * * read the specified ResourceQuota * @param name name of the ResourceQuota (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -41694,7 +41694,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) t } /** - * + * * read status of the specified ResourceQuota * @param name name of the ResourceQuota (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -41877,7 +41877,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * read the specified Secret * @param name name of the Secret (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -42060,7 +42060,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws } /** - * + * * read the specified Service * @param name name of the Service (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -42243,7 +42243,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) } /** - * + * * read the specified ServiceAccount * @param name name of the ServiceAccount (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -42426,7 +42426,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws } /** - * + * * read status of the specified Service * @param name name of the Service (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -42601,7 +42601,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * read the specified Node * @param name name of the Node (required) * @return APIreadNodeRequest @@ -42775,7 +42775,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * read status of the specified Node * @param name name of the Node (required) * @return APIreadNodeStatusRequest @@ -42949,7 +42949,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback } /** - * + * * read the specified PersistentVolume * @param name name of the PersistentVolume (required) * @return APIreadPersistentVolumeRequest @@ -43123,7 +43123,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback } /** - * + * * read status of the specified PersistentVolume * @param name name of the PersistentVolume (required) * @return APIreadPersistentVolumeStatusRequest @@ -43354,7 +43354,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throw } /** - * + * * replace the specified Namespace * @param name name of the Namespace (required) * @param body (required) @@ -43587,7 +43587,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throw } /** - * + * * replace finalize of the specified Namespace * @param name name of the Namespace (required) * @param body (required) @@ -43820,7 +43820,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throw } /** - * + * * replace status of the specified Namespace * @param name name of the Namespace (required) * @param body (required) @@ -44061,7 +44061,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throw } /** - * + * * replace the specified ConfigMap * @param name name of the ConfigMap (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -44303,7 +44303,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throw } /** - * + * * replace the specified Endpoints * @param name name of the Endpoints (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -44545,7 +44545,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throw } /** - * + * * replace the specified Event * @param name name of the Event (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -44787,7 +44787,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) thro } /** - * + * * replace the specified LimitRange * @param name name of the LimitRange (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -45029,7 +45029,7 @@ public okhttp3.Call executeAsync(final ApiCallback _cal } /** - * + * * replace the specified PersistentVolumeClaim * @param name name of the PersistentVolumeClaim (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -45271,7 +45271,7 @@ public okhttp3.Call executeAsync(final ApiCallback _cal } /** - * + * * replace status of the specified PersistentVolumeClaim * @param name name of the PersistentVolumeClaim (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -45513,7 +45513,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiE } /** - * + * * replace the specified Pod * @param name name of the Pod (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -45755,7 +45755,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiE } /** - * + * * replace ephemeralcontainers of the specified Pod * @param name name of the Pod (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -45997,7 +45997,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiE } /** - * + * * replace status of the specified Pod * @param name name of the Pod (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -46239,7 +46239,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) thr } /** - * + * * replace the specified PodTemplate * @param name name of the PodTemplate (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -46481,7 +46481,7 @@ public okhttp3.Call executeAsync(final ApiCallback _cal } /** - * + * * replace the specified ReplicationController * @param name name of the ReplicationController (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -46723,7 +46723,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Ap } /** - * + * * replace scale of the specified ReplicationController * @param name name of the Scale (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -46965,7 +46965,7 @@ public okhttp3.Call executeAsync(final ApiCallback _cal } /** - * + * * replace status of the specified ReplicationController * @param name name of the ReplicationController (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -47207,7 +47207,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) t } /** - * + * * replace the specified ResourceQuota * @param name name of the ResourceQuota (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -47449,7 +47449,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) t } /** - * + * * replace status of the specified ResourceQuota * @param name name of the ResourceQuota (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -47691,7 +47691,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * replace the specified Secret * @param name name of the Secret (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -47933,7 +47933,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws } /** - * + * * replace the specified Service * @param name name of the Service (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -48175,7 +48175,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) } /** - * + * * replace the specified ServiceAccount * @param name name of the ServiceAccount (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -48417,7 +48417,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws } /** - * + * * replace status of the specified Service * @param name name of the Service (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -48651,7 +48651,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * replace the specified Node * @param name name of the Node (required) * @param body (required) @@ -48884,7 +48884,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * replace status of the specified Node * @param name name of the Node (required) * @param body (required) @@ -49117,7 +49117,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback } /** - * + * * replace the specified PersistentVolume * @param name name of the PersistentVolume (required) * @param body (required) @@ -49350,7 +49350,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback } /** - * + * * replace status of the specified PersistentVolume * @param name name of the PersistentVolume (required) * @param body (required) diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/CustomObjectsApi.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/CustomObjectsApi.java index a2c3486d49..12b4b365d7 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/CustomObjectsApi.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/CustomObjectsApi.java @@ -1,15 +1,16 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.apis; import io.kubernetes.client.openapi.ApiCallback; @@ -34,7 +35,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import jakarta.ws.rs.core.GenericType; public class CustomObjectsApi { private ApiClient localVarApiClient; @@ -300,7 +300,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * Creates a cluster scoped Custom object * @param group The custom resource's group name (required) * @param version The custom resource's version (required) @@ -552,7 +552,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * Creates a namespace scoped Custom object * @param group The custom resource's group name (required) * @param version The custom resource's version (required) @@ -809,7 +809,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * Deletes the specified cluster scoped custom object * @param group the custom resource's group (required) * @param version the custom resource's version (required) @@ -1087,7 +1087,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * Delete collection of cluster scoped custom objects * @param group The custom resource's group name (required) * @param version The custom resource's version (required) @@ -1372,7 +1372,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * Delete collection of namespace scoped custom objects * @param group The custom resource's group name (required) * @param version The custom resource's version (required) @@ -1636,7 +1636,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * Deletes the specified namespace scoped custom object * @param group the custom resource's group (required) * @param version the custom resource's version (required) @@ -1805,7 +1805,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) } /** - * + * * get available resources * @param group The custom resource's group name (required) * @param version The custom resource's version (required) @@ -1987,7 +1987,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * Returns a cluster scoped custom object * @param group the custom resource's group (required) * @param version the custom resource's version (required) @@ -2173,7 +2173,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * read scale of the specified custom object * @param group the custom resource's group (required) * @param version the custom resource's version (required) @@ -2359,7 +2359,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * read status of the specified cluster scoped custom object * @param group the custom resource's group (required) * @param version the custom resource's version (required) @@ -2551,7 +2551,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * Returns a namespace scoped custom object * @param group the custom resource's group (required) * @param version the custom resource's version (required) @@ -2746,7 +2746,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * read scale of the specified namespace scoped custom object * @param group the custom resource's group (required) * @param version the custom resource's version (required) @@ -2941,7 +2941,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * read status of the specified namespace scoped custom object * @param group the custom resource's group (required) * @param version the custom resource's version (required) @@ -3269,7 +3269,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * list or watch cluster scoped custom objects * @param group The custom resource's group name (required) * @param version The custom resource's version (required) @@ -3603,7 +3603,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * list or watch namespace scoped custom objects * @param group The custom resource's group name (required) * @param version The custom resource's version (required) @@ -3855,7 +3855,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * patch the specified cluster scoped custom object * @param group the custom resource's group (required) * @param version the custom resource's version (required) @@ -4110,7 +4110,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * partially update scale of the specified cluster scoped custom object * @param group the custom resource's group (required) * @param version the custom resource's version (required) @@ -4365,7 +4365,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * partially update status of the specified cluster scoped custom object * @param group the custom resource's group (required) * @param version the custom resource's version (required) @@ -4626,7 +4626,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * patch the specified namespace scoped custom object * @param group the custom resource's group (required) * @param version the custom resource's version (required) @@ -4890,7 +4890,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * partially update scale of the specified namespace scoped custom object * @param group the custom resource's group (required) * @param version the custom resource's version (required) @@ -5154,7 +5154,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * partially update status of the specified namespace scoped custom object * @param group the custom resource's group (required) * @param version the custom resource's version (required) @@ -5393,7 +5393,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * replace the specified cluster scoped custom object * @param group the custom resource's group (required) * @param version the custom resource's version (required) @@ -5637,7 +5637,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * replace scale of the specified cluster scoped custom object * @param group the custom resource's group (required) * @param version the custom resource's version (required) @@ -5882,7 +5882,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * replace status of the cluster scoped specified custom object * @param group the custom resource's group (required) * @param version the custom resource's version (required) @@ -6129,7 +6129,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * replace the specified namespace scoped custom object * @param group the custom resource's group (required) * @param version the custom resource's version (required) @@ -6382,7 +6382,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * replace scale of the specified namespace scoped custom object * @param group the custom resource's group (required) * @param version the custom resource's version (required) @@ -6636,7 +6636,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * replace status of the specified namespace scoped custom object * @param group the custom resource's group (required) * @param version the custom resource's version (required) diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/DiscoveryApi.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/DiscoveryApi.java index 1b684eca6d..1a46916e41 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/DiscoveryApi.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/DiscoveryApi.java @@ -1,15 +1,16 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.apis; import io.kubernetes.client.openapi.ApiCallback; @@ -33,7 +34,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import jakarta.ws.rs.core.GenericType; public class DiscoveryApi { private ApiClient localVarApiClient; @@ -209,7 +209,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws } /** - * + * * get information of a group * @return APIgetAPIGroupRequest * @http.response.details diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/DiscoveryV1Api.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/DiscoveryV1Api.java index 285a1bd13c..bb56aab335 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/DiscoveryV1Api.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/DiscoveryV1Api.java @@ -1,15 +1,16 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.apis; import io.kubernetes.client.openapi.ApiCallback; @@ -38,7 +39,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import jakarta.ws.rs.core.GenericType; public class DiscoveryV1Api { private ApiClient localVarApiClient; @@ -298,7 +298,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) t } /** - * + * * create an EndpointSlice * @param namespace object name and auth scope, such as for teams and projects (required) * @param body (required) @@ -667,7 +667,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete collection of EndpointSlice * @param namespace object name and auth scope, such as for teams and projects (required) * @return APIdeleteCollectionNamespacedEndpointSliceRequest @@ -925,7 +925,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete an EndpointSlice * @param name name of the EndpointSlice (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -1078,7 +1078,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) } /** - * + * * get available resources * @return APIgetAPIResourcesRequest * @http.response.details @@ -1395,7 +1395,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callbac } /** - * + * * list or watch objects of kind EndpointSlice * @return APIlistEndpointSliceForAllNamespacesRequest * @http.response.details @@ -1720,7 +1720,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callbac } /** - * + * * list or watch objects of kind EndpointSlice * @param namespace object name and auth scope, such as for teams and projects (required) * @return APIlistNamespacedEndpointSliceRequest @@ -1974,7 +1974,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) t } /** - * + * * partially update the specified EndpointSlice * @param name name of the EndpointSlice (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -2159,7 +2159,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) t } /** - * + * * read the specified EndpointSlice * @param name name of the EndpointSlice (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -2399,7 +2399,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) t } /** - * + * * replace the specified EndpointSlice * @param name name of the EndpointSlice (required) * @param namespace object name and auth scope, such as for teams and projects (required) diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/EventsApi.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/EventsApi.java index 1bcbfd3156..6e50d8c0ed 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/EventsApi.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/EventsApi.java @@ -1,15 +1,16 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.apis; import io.kubernetes.client.openapi.ApiCallback; @@ -33,7 +34,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import jakarta.ws.rs.core.GenericType; public class EventsApi { private ApiClient localVarApiClient; @@ -209,7 +209,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws } /** - * + * * get information of a group * @return APIgetAPIGroupRequest * @http.response.details diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/EventsV1Api.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/EventsV1Api.java index 2ae18d992d..398582acdf 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/EventsV1Api.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/EventsV1Api.java @@ -1,15 +1,16 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.apis; import io.kubernetes.client.openapi.ApiCallback; @@ -38,7 +39,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import jakarta.ws.rs.core.GenericType; public class EventsV1Api { private ApiClient localVarApiClient; @@ -298,7 +298,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) thr } /** - * + * * create an Event * @param namespace object name and auth scope, such as for teams and projects (required) * @param body (required) @@ -667,7 +667,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete collection of Event * @param namespace object name and auth scope, such as for teams and projects (required) * @return APIdeleteCollectionNamespacedEventRequest @@ -925,7 +925,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete an Event * @param name name of the Event (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -1078,7 +1078,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) } /** - * + * * get available resources * @return APIgetAPIResourcesRequest * @http.response.details @@ -1395,7 +1395,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) } /** - * + * * list or watch objects of kind Event * @return APIlistEventForAllNamespacesRequest * @http.response.details @@ -1720,7 +1720,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) } /** - * + * * list or watch objects of kind Event * @param namespace object name and auth scope, such as for teams and projects (required) * @return APIlistNamespacedEventRequest @@ -1974,7 +1974,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) thr } /** - * + * * partially update the specified Event * @param name name of the Event (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -2159,7 +2159,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) thr } /** - * + * * read the specified Event * @param name name of the Event (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -2399,7 +2399,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) thr } /** - * + * * replace the specified Event * @param name name of the Event (required) * @param namespace object name and auth scope, such as for teams and projects (required) diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/FlowcontrolApiserverApi.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/FlowcontrolApiserverApi.java index 83258eb9eb..2dffc95b2a 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/FlowcontrolApiserverApi.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/FlowcontrolApiserverApi.java @@ -1,15 +1,16 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.apis; import io.kubernetes.client.openapi.ApiCallback; @@ -33,7 +34,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import jakarta.ws.rs.core.GenericType; public class FlowcontrolApiserverApi { private ApiClient localVarApiClient; @@ -209,7 +209,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws } /** - * + * * get information of a group * @return APIgetAPIGroupRequest * @http.response.details diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/FlowcontrolApiserverV1Api.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/FlowcontrolApiserverV1Api.java index 19d19dd052..bf3f9cf692 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/FlowcontrolApiserverV1Api.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/FlowcontrolApiserverV1Api.java @@ -1,15 +1,16 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.apis; import io.kubernetes.client.openapi.ApiCallback; @@ -40,7 +41,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import jakarta.ws.rs.core.GenericType; public class FlowcontrolApiserverV1Api { private ApiClient localVarApiClient; @@ -292,7 +292,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) thro } /** - * + * * create a FlowSchema * @param body (required) * @return APIcreateFlowSchemaRequest @@ -521,7 +521,7 @@ public okhttp3.Call executeAsync(final ApiCallback } /** - * + * * create a PriorityLevelConfiguration * @param body (required) * @return APIcreatePriorityLevelConfigurationRequest @@ -881,7 +881,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete collection of FlowSchema * @return APIdeleteCollectionFlowSchemaRequest * @http.response.details @@ -1238,7 +1238,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete collection of PriorityLevelConfiguration * @return APIdeleteCollectionPriorityLevelConfigurationRequest * @http.response.details @@ -1487,7 +1487,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete a FlowSchema * @param name name of the FlowSchema (required) * @return APIdeleteFlowSchemaRequest @@ -1738,7 +1738,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete a PriorityLevelConfiguration * @param name name of the PriorityLevelConfiguration (required) * @return APIdeletePriorityLevelConfigurationRequest @@ -1890,7 +1890,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) } /** - * + * * get available resources * @return APIgetAPIResourcesRequest * @http.response.details @@ -2207,7 +2207,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) } /** - * + * * list or watch objects of kind FlowSchema * @return APIlistFlowSchemaRequest * @http.response.details @@ -2524,7 +2524,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) thro } /** - * + * * partially update the specified FlowSchema * @param name name of the FlowSchema (required) * @param body (required) @@ -3017,7 +3017,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) thro } /** - * + * * partially update status of the specified FlowSchema * @param name name of the FlowSchema (required) * @param body (required) @@ -3265,7 +3265,7 @@ public okhttp3.Call executeAsync(final ApiCallback } /** - * + * * partially update the specified PriorityLevelConfiguration * @param name name of the PriorityLevelConfiguration (required) * @param body (required) @@ -3513,7 +3513,7 @@ public okhttp3.Call executeAsync(final ApiCallback } /** - * + * * partially update status of the specified PriorityLevelConfiguration * @param name name of the PriorityLevelConfiguration (required) * @param body (required) @@ -3689,7 +3689,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) thro } /** - * + * * read the specified FlowSchema * @param name name of the FlowSchema (required) * @return APIreadFlowSchemaRequest @@ -3863,7 +3863,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) thro } /** - * + * * read status of the specified FlowSchema * @param name name of the FlowSchema (required) * @return APIreadFlowSchemaStatusRequest @@ -4037,7 +4037,7 @@ public okhttp3.Call executeAsync(final ApiCallback } /** - * + * * read the specified PriorityLevelConfiguration * @param name name of the PriorityLevelConfiguration (required) * @return APIreadPriorityLevelConfigurationRequest @@ -4211,7 +4211,7 @@ public okhttp3.Call executeAsync(final ApiCallback } /** - * + * * read status of the specified PriorityLevelConfiguration * @param name name of the PriorityLevelConfiguration (required) * @return APIreadPriorityLevelConfigurationStatusRequest @@ -4442,7 +4442,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) thro } /** - * + * * replace the specified FlowSchema * @param name name of the FlowSchema (required) * @param body (required) @@ -4675,7 +4675,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) thro } /** - * + * * replace status of the specified FlowSchema * @param name name of the FlowSchema (required) * @param body (required) @@ -4908,7 +4908,7 @@ public okhttp3.Call executeAsync(final ApiCallback } /** - * + * * replace the specified PriorityLevelConfiguration * @param name name of the PriorityLevelConfiguration (required) * @param body (required) @@ -5141,7 +5141,7 @@ public okhttp3.Call executeAsync(final ApiCallback } /** - * + * * replace status of the specified PriorityLevelConfiguration * @param name name of the PriorityLevelConfiguration (required) * @param body (required) diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/FlowcontrolApiserverV1beta3Api.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/FlowcontrolApiserverV1beta3Api.java index e6663ab7f6..41f320f36c 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/FlowcontrolApiserverV1beta3Api.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/FlowcontrolApiserverV1beta3Api.java @@ -1,15 +1,16 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.apis; import io.kubernetes.client.openapi.ApiCallback; @@ -40,7 +41,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import jakarta.ws.rs.core.GenericType; public class FlowcontrolApiserverV1beta3Api { private ApiClient localVarApiClient; @@ -292,7 +292,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) } /** - * + * * create a FlowSchema * @param body (required) * @return APIcreateFlowSchemaRequest @@ -521,7 +521,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete collection of FlowSchema * @return APIdeleteCollectionFlowSchemaRequest * @http.response.details @@ -1238,7 +1238,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete collection of PriorityLevelConfiguration * @return APIdeleteCollectionPriorityLevelConfigurationRequest * @http.response.details @@ -1487,7 +1487,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete a FlowSchema * @param name name of the FlowSchema (required) * @return APIdeleteFlowSchemaRequest @@ -1738,7 +1738,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete a PriorityLevelConfiguration * @param name name of the PriorityLevelConfiguration (required) * @return APIdeletePriorityLevelConfigurationRequest @@ -1890,7 +1890,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) } /** - * + * * get available resources * @return APIgetAPIResourcesRequest * @http.response.details @@ -2207,7 +2207,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callb } /** - * + * * list or watch objects of kind FlowSchema * @return APIlistFlowSchemaRequest * @http.response.details @@ -2524,7 +2524,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) } /** - * + * * partially update the specified FlowSchema * @param name name of the FlowSchema (required) * @param body (required) @@ -3017,7 +3017,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) } /** - * + * * partially update status of the specified FlowSchema * @param name name of the FlowSchema (required) * @param body (required) @@ -3265,7 +3265,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) } /** - * + * * read the specified FlowSchema * @param name name of the FlowSchema (required) * @return APIreadFlowSchemaRequest @@ -3863,7 +3863,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) } /** - * + * * read status of the specified FlowSchema * @param name name of the FlowSchema (required) * @return APIreadFlowSchemaStatusRequest @@ -4037,7 +4037,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) } /** - * + * * replace the specified FlowSchema * @param name name of the FlowSchema (required) * @param body (required) @@ -4675,7 +4675,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) } /** - * + * * replace status of the specified FlowSchema * @param name name of the FlowSchema (required) * @param body (required) @@ -4908,7 +4908,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws } /** - * + * * get information of a group * @return APIgetAPIGroupRequest * @http.response.details diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/InternalApiserverV1alpha1Api.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/InternalApiserverV1alpha1Api.java index 89cdace762..ce52423dfc 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/InternalApiserverV1alpha1Api.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/InternalApiserverV1alpha1Api.java @@ -1,15 +1,16 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.apis; import io.kubernetes.client.openapi.ApiCallback; @@ -38,7 +39,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import jakarta.ws.rs.core.GenericType; public class InternalApiserverV1alpha1Api { private ApiClient localVarApiClient; @@ -290,7 +290,7 @@ public okhttp3.Call executeAsync(final ApiCallback _call } /** - * + * * create a StorageVersion * @param body (required) * @return APIcreateStorageVersionRequest @@ -650,7 +650,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete collection of StorageVersion * @return APIdeleteCollectionStorageVersionRequest * @http.response.details @@ -899,7 +899,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete a StorageVersion * @param name name of the StorageVersion (required) * @return APIdeleteStorageVersionRequest @@ -1051,7 +1051,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) } /** - * + * * get available resources * @return APIgetAPIResourcesRequest * @http.response.details @@ -1368,7 +1368,7 @@ public okhttp3.Call executeAsync(final ApiCallback _ } /** - * + * * list or watch objects of kind StorageVersion * @return APIlistStorageVersionRequest * @http.response.details @@ -1613,7 +1613,7 @@ public okhttp3.Call executeAsync(final ApiCallback _call } /** - * + * * partially update the specified StorageVersion * @param name name of the StorageVersion (required) * @param body (required) @@ -1861,7 +1861,7 @@ public okhttp3.Call executeAsync(final ApiCallback _call } /** - * + * * partially update status of the specified StorageVersion * @param name name of the StorageVersion (required) * @param body (required) @@ -2037,7 +2037,7 @@ public okhttp3.Call executeAsync(final ApiCallback _call } /** - * + * * read the specified StorageVersion * @param name name of the StorageVersion (required) * @return APIreadStorageVersionRequest @@ -2211,7 +2211,7 @@ public okhttp3.Call executeAsync(final ApiCallback _call } /** - * + * * read status of the specified StorageVersion * @param name name of the StorageVersion (required) * @return APIreadStorageVersionStatusRequest @@ -2442,7 +2442,7 @@ public okhttp3.Call executeAsync(final ApiCallback _call } /** - * + * * replace the specified StorageVersion * @param name name of the StorageVersion (required) * @param body (required) @@ -2675,7 +2675,7 @@ public okhttp3.Call executeAsync(final ApiCallback _call } /** - * + * * replace status of the specified StorageVersion * @param name name of the StorageVersion (required) * @param body (required) diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/LogsApi.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/LogsApi.java index f19ad8bbd5..8e9d7bd50f 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/LogsApi.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/LogsApi.java @@ -1,15 +1,16 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.apis; import io.kubernetes.client.openapi.ApiCallback; @@ -32,7 +33,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import jakarta.ws.rs.core.GenericType; public class LogsApi { private ApiClient localVarApiClient; @@ -205,8 +205,8 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiEx } /** - * - * + * + * * @param logpath path to the log (required) * @return APIlogFileHandlerRequest * @http.response.details @@ -344,8 +344,8 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiEx } /** - * - * + * + * * @return APIlogFileListHandlerRequest * @http.response.details diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/NetworkingApi.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/NetworkingApi.java index 6d6a858e78..4a6dcfcf96 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/NetworkingApi.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/NetworkingApi.java @@ -1,15 +1,16 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.apis; import io.kubernetes.client.openapi.ApiCallback; @@ -33,7 +34,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import jakarta.ws.rs.core.GenericType; public class NetworkingApi { private ApiClient localVarApiClient; @@ -209,7 +209,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws } /** - * + * * get information of a group * @return APIgetAPIGroupRequest * @http.response.details diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/NetworkingV1Api.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/NetworkingV1Api.java index c1dc135212..8db118245c 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/NetworkingV1Api.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/NetworkingV1Api.java @@ -1,15 +1,16 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.apis; import io.kubernetes.client.openapi.ApiCallback; @@ -42,7 +43,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import jakarta.ws.rs.core.GenericType; public class NetworkingV1Api { private ApiClient localVarApiClient; @@ -294,7 +294,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) th } /** - * + * * create an IngressClass * @param body (required) * @return APIcreateIngressClassRequest @@ -531,7 +531,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws } /** - * + * * create an Ingress * @param namespace object name and auth scope, such as for teams and projects (required) * @param body (required) @@ -769,7 +769,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) t } /** - * + * * create a NetworkPolicy * @param namespace object name and auth scope, such as for teams and projects (required) * @param body (required) @@ -1130,7 +1130,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete collection of IngressClass * @return APIdeleteCollectionIngressClassRequest * @http.response.details @@ -1495,7 +1495,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete collection of Ingress * @param namespace object name and auth scope, such as for teams and projects (required) * @return APIdeleteCollectionNamespacedIngressRequest @@ -1861,7 +1861,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete collection of NetworkPolicy * @param namespace object name and auth scope, such as for teams and projects (required) * @return APIdeleteCollectionNamespacedNetworkPolicyRequest @@ -2111,7 +2111,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete an IngressClass * @param name name of the IngressClass (required) * @return APIdeleteIngressClassRequest @@ -2370,7 +2370,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete an Ingress * @param name name of the Ingress (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -2630,7 +2630,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete a NetworkPolicy * @param name name of the NetworkPolicy (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -2783,7 +2783,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) } /** - * + * * get available resources * @return APIgetAPIResourcesRequest * @http.response.details @@ -3100,7 +3100,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback } /** - * + * * list or watch objects of kind IngressClass * @return APIlistIngressClassRequest * @http.response.details @@ -3417,7 +3417,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) thr } /** - * + * * list or watch objects of kind Ingress * @return APIlistIngressForAllNamespacesRequest * @http.response.details @@ -3742,7 +3742,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) thr } /** - * + * * list or watch objects of kind Ingress * @param namespace object name and auth scope, such as for teams and projects (required) * @return APIlistNamespacedIngressRequest @@ -4068,7 +4068,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callbac } /** - * + * * list or watch objects of kind NetworkPolicy * @param namespace object name and auth scope, such as for teams and projects (required) * @return APIlistNamespacedNetworkPolicyRequest @@ -4386,7 +4386,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callbac } /** - * + * * list or watch objects of kind NetworkPolicy * @return APIlistNetworkPolicyForAllNamespacesRequest * @http.response.details @@ -4631,7 +4631,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) th } /** - * + * * partially update the specified IngressClass * @param name name of the IngressClass (required) * @param body (required) @@ -4887,7 +4887,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws } /** - * + * * partially update the specified Ingress * @param name name of the Ingress (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -5144,7 +5144,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws } /** - * + * * partially update status of the specified Ingress * @param name name of the Ingress (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -5401,7 +5401,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) t } /** - * + * * partially update the specified NetworkPolicy * @param name name of the NetworkPolicy (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -5578,7 +5578,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) th } /** - * + * * read the specified IngressClass * @param name name of the IngressClass (required) * @return APIreadIngressClassRequest @@ -5760,7 +5760,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws } /** - * + * * read the specified Ingress * @param name name of the Ingress (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -5943,7 +5943,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws } /** - * + * * read status of the specified Ingress * @param name name of the Ingress (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -6126,7 +6126,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) t } /** - * + * * read the specified NetworkPolicy * @param name name of the NetworkPolicy (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -6358,7 +6358,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) th } /** - * + * * replace the specified IngressClass * @param name name of the IngressClass (required) * @param body (required) @@ -6599,7 +6599,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws } /** - * + * * replace the specified Ingress * @param name name of the Ingress (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -6841,7 +6841,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws } /** - * + * * replace status of the specified Ingress * @param name name of the Ingress (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -7083,7 +7083,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) t } /** - * + * * replace the specified NetworkPolicy * @param name name of the NetworkPolicy (required) * @param namespace object name and auth scope, such as for teams and projects (required) diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/NetworkingV1alpha1Api.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/NetworkingV1alpha1Api.java index 5b0933478d..b6b852befe 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/NetworkingV1alpha1Api.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/NetworkingV1alpha1Api.java @@ -1,15 +1,16 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.apis; import io.kubernetes.client.openapi.ApiCallback; @@ -40,7 +41,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import jakarta.ws.rs.core.GenericType; public class NetworkingV1alpha1Api { private ApiClient localVarApiClient; @@ -292,7 +292,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) } /** - * + * * create an IPAddress * @param body (required) * @return APIcreateIPAddressRequest @@ -521,7 +521,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callbac } /** - * + * * create a ServiceCIDR * @param body (required) * @return APIcreateServiceCIDRRequest @@ -881,7 +881,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete collection of IPAddress * @return APIdeleteCollectionIPAddressRequest * @http.response.details @@ -1238,7 +1238,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete collection of ServiceCIDR * @return APIdeleteCollectionServiceCIDRRequest * @http.response.details @@ -1487,7 +1487,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete an IPAddress * @param name name of the IPAddress (required) * @return APIdeleteIPAddressRequest @@ -1738,7 +1738,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete a ServiceCIDR * @param name name of the ServiceCIDR (required) * @return APIdeleteServiceCIDRRequest @@ -1890,7 +1890,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) } /** - * + * * get available resources * @return APIgetAPIResourcesRequest * @http.response.details @@ -2207,7 +2207,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callb } /** - * + * * list or watch objects of kind IPAddress * @return APIlistIPAddressRequest * @http.response.details @@ -2524,7 +2524,7 @@ public okhttp3.Call executeAsync(final ApiCallback _cal } /** - * + * * list or watch objects of kind ServiceCIDR * @return APIlistServiceCIDRRequest * @http.response.details @@ -2769,7 +2769,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) } /** - * + * * partially update the specified IPAddress * @param name name of the IPAddress (required) * @param body (required) @@ -3017,7 +3017,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callbac } /** - * + * * partially update the specified ServiceCIDR * @param name name of the ServiceCIDR (required) * @param body (required) @@ -3265,7 +3265,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callbac } /** - * + * * partially update status of the specified ServiceCIDR * @param name name of the ServiceCIDR (required) * @param body (required) @@ -3441,7 +3441,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) } /** - * + * * read the specified IPAddress * @param name name of the IPAddress (required) * @return APIreadIPAddressRequest @@ -3615,7 +3615,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callbac } /** - * + * * read the specified ServiceCIDR * @param name name of the ServiceCIDR (required) * @return APIreadServiceCIDRRequest @@ -3789,7 +3789,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callbac } /** - * + * * read status of the specified ServiceCIDR * @param name name of the ServiceCIDR (required) * @return APIreadServiceCIDRStatusRequest @@ -4020,7 +4020,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) } /** - * + * * replace the specified IPAddress * @param name name of the IPAddress (required) * @param body (required) @@ -4253,7 +4253,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callbac } /** - * + * * replace the specified ServiceCIDR * @param name name of the ServiceCIDR (required) * @param body (required) @@ -4486,7 +4486,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callbac } /** - * + * * replace status of the specified ServiceCIDR * @param name name of the ServiceCIDR (required) * @param body (required) diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/NodeApi.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/NodeApi.java index d458d9720a..516eecf5ae 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/NodeApi.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/NodeApi.java @@ -1,15 +1,16 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.apis; import io.kubernetes.client.openapi.ApiCallback; @@ -33,7 +34,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import jakarta.ws.rs.core.GenericType; public class NodeApi { private ApiClient localVarApiClient; @@ -209,7 +209,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws } /** - * + * * get information of a group * @return APIgetAPIGroupRequest * @http.response.details diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/NodeV1Api.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/NodeV1Api.java index a4dfc80149..5074acee90 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/NodeV1Api.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/NodeV1Api.java @@ -1,15 +1,16 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.apis; import io.kubernetes.client.openapi.ApiCallback; @@ -38,7 +39,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import jakarta.ws.rs.core.GenericType; public class NodeV1Api { private ApiClient localVarApiClient; @@ -290,7 +290,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) th } /** - * + * * create a RuntimeClass * @param body (required) * @return APIcreateRuntimeClassRequest @@ -650,7 +650,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete collection of RuntimeClass * @return APIdeleteCollectionRuntimeClassRequest * @http.response.details @@ -899,7 +899,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete a RuntimeClass * @param name name of the RuntimeClass (required) * @return APIdeleteRuntimeClassRequest @@ -1051,7 +1051,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) } /** - * + * * get available resources * @return APIgetAPIResourcesRequest * @http.response.details @@ -1368,7 +1368,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback } /** - * + * * list or watch objects of kind RuntimeClass * @return APIlistRuntimeClassRequest * @http.response.details @@ -1613,7 +1613,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) th } /** - * + * * partially update the specified RuntimeClass * @param name name of the RuntimeClass (required) * @param body (required) @@ -1789,7 +1789,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) th } /** - * + * * read the specified RuntimeClass * @param name name of the RuntimeClass (required) * @return APIreadRuntimeClassRequest @@ -2020,7 +2020,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) th } /** - * + * * replace the specified RuntimeClass * @param name name of the RuntimeClass (required) * @param body (required) diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/OpenidApi.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/OpenidApi.java index 08e3840da2..4178240b60 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/OpenidApi.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/OpenidApi.java @@ -1,15 +1,16 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.apis; import io.kubernetes.client.openapi.ApiCallback; @@ -32,7 +33,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import jakarta.ws.rs.core.GenericType; public class OpenidApi { private ApiClient localVarApiClient; @@ -206,7 +206,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * get service account issuer OpenID JSON Web Key Set (contains public token verification keys) * @return APIgetServiceAccountIssuerOpenIDKeysetRequest * @http.response.details diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/PolicyApi.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/PolicyApi.java index 38016f5e9e..372dce714f 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/PolicyApi.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/PolicyApi.java @@ -1,15 +1,16 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.apis; import io.kubernetes.client.openapi.ApiCallback; @@ -33,7 +34,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import jakarta.ws.rs.core.GenericType; public class PolicyApi { private ApiClient localVarApiClient; @@ -209,7 +209,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws } /** - * + * * get information of a group * @return APIgetAPIGroupRequest * @http.response.details diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/PolicyV1Api.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/PolicyV1Api.java index f8622987f2..370967fad3 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/PolicyV1Api.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/PolicyV1Api.java @@ -1,15 +1,16 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.apis; import io.kubernetes.client.openapi.ApiCallback; @@ -38,7 +39,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import jakarta.ws.rs.core.GenericType; public class PolicyV1Api { private ApiClient localVarApiClient; @@ -298,7 +298,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callb } /** - * + * * create a PodDisruptionBudget * @param namespace object name and auth scope, such as for teams and projects (required) * @param body (required) @@ -667,7 +667,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete collection of PodDisruptionBudget * @param namespace object name and auth scope, such as for teams and projects (required) * @return APIdeleteCollectionNamespacedPodDisruptionBudgetRequest @@ -925,7 +925,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete a PodDisruptionBudget * @param name name of the PodDisruptionBudget (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -1078,7 +1078,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) } /** - * + * * get available resources * @return APIgetAPIResourcesRequest * @http.response.details @@ -1403,7 +1403,7 @@ public okhttp3.Call executeAsync(final ApiCallback _c } /** - * + * * list or watch objects of kind PodDisruptionBudget * @param namespace object name and auth scope, such as for teams and projects (required) * @return APIlistNamespacedPodDisruptionBudgetRequest @@ -1721,7 +1721,7 @@ public okhttp3.Call executeAsync(final ApiCallback _c } /** - * + * * list or watch objects of kind PodDisruptionBudget * @return APIlistPodDisruptionBudgetForAllNamespacesRequest * @http.response.details @@ -1974,7 +1974,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callb } /** - * + * * partially update the specified PodDisruptionBudget * @param name name of the PodDisruptionBudget (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -2231,7 +2231,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callb } /** - * + * * partially update status of the specified PodDisruptionBudget * @param name name of the PodDisruptionBudget (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -2416,7 +2416,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callb } /** - * + * * read the specified PodDisruptionBudget * @param name name of the PodDisruptionBudget (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -2599,7 +2599,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callb } /** - * + * * read status of the specified PodDisruptionBudget * @param name name of the PodDisruptionBudget (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -2839,7 +2839,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callb } /** - * + * * replace the specified PodDisruptionBudget * @param name name of the PodDisruptionBudget (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -3081,7 +3081,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callb } /** - * + * * replace status of the specified PodDisruptionBudget * @param name name of the PodDisruptionBudget (required) * @param namespace object name and auth scope, such as for teams and projects (required) diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/RbacAuthorizationApi.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/RbacAuthorizationApi.java index 2da78bf293..567caad49a 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/RbacAuthorizationApi.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/RbacAuthorizationApi.java @@ -1,15 +1,16 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.apis; import io.kubernetes.client.openapi.ApiCallback; @@ -33,7 +34,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import jakarta.ws.rs.core.GenericType; public class RbacAuthorizationApi { private ApiClient localVarApiClient; @@ -209,7 +209,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws } /** - * + * * get information of a group * @return APIgetAPIGroupRequest * @http.response.details diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/RbacAuthorizationV1Api.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/RbacAuthorizationV1Api.java index 5674c98ee3..d7cf1d319d 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/RbacAuthorizationV1Api.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/RbacAuthorizationV1Api.java @@ -1,15 +1,16 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.apis; import io.kubernetes.client.openapi.ApiCallback; @@ -44,7 +45,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import jakarta.ws.rs.core.GenericType; public class RbacAuthorizationV1Api { private ApiClient localVarApiClient; @@ -296,7 +296,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) thr } /** - * + * * create a ClusterRole * @param body (required) * @return APIcreateClusterRoleRequest @@ -525,7 +525,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callba } /** - * + * * create a ClusterRoleBinding * @param body (required) * @return APIcreateClusterRoleBindingRequest @@ -762,7 +762,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * create a Role * @param namespace object name and auth scope, such as for teams and projects (required) * @param body (required) @@ -1000,7 +1000,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) thr } /** - * + * * create a RoleBinding * @param namespace object name and auth scope, such as for teams and projects (required) * @param body (required) @@ -1253,7 +1253,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete a ClusterRole * @param name name of the ClusterRole (required) * @return APIdeleteClusterRoleRequest @@ -1504,7 +1504,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete a ClusterRoleBinding * @param name name of the ClusterRoleBinding (required) * @return APIdeleteClusterRoleBindingRequest @@ -1863,7 +1863,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete collection of ClusterRole * @return APIdeleteCollectionClusterRoleRequest * @http.response.details @@ -2220,7 +2220,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete collection of ClusterRoleBinding * @return APIdeleteCollectionClusterRoleBindingRequest * @http.response.details @@ -2585,7 +2585,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete collection of Role * @param namespace object name and auth scope, such as for teams and projects (required) * @return APIdeleteCollectionNamespacedRoleRequest @@ -2951,7 +2951,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete collection of RoleBinding * @param namespace object name and auth scope, such as for teams and projects (required) * @return APIdeleteCollectionNamespacedRoleBindingRequest @@ -3209,7 +3209,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete a Role * @param name name of the Role (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -3469,7 +3469,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete a RoleBinding * @param name name of the RoleBinding (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -3622,7 +3622,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) } /** - * + * * get available resources * @return APIgetAPIResourcesRequest * @http.response.details @@ -3939,7 +3939,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) } /** - * + * * list or watch objects of kind ClusterRole * @return APIlistClusterRoleRequest * @http.response.details @@ -4256,7 +4256,7 @@ public okhttp3.Call executeAsync(final ApiCallback _ca } /** - * + * * list or watch objects of kind ClusterRoleBinding * @return APIlistClusterRoleBindingRequest * @http.response.details @@ -4581,7 +4581,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws } /** - * + * * list or watch objects of kind Role * @param namespace object name and auth scope, such as for teams and projects (required) * @return APIlistNamespacedRoleRequest @@ -4907,7 +4907,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) } /** - * + * * list or watch objects of kind RoleBinding * @param namespace object name and auth scope, such as for teams and projects (required) * @return APIlistNamespacedRoleBindingRequest @@ -5225,7 +5225,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) } /** - * + * * list or watch objects of kind RoleBinding * @return APIlistRoleBindingForAllNamespacesRequest * @http.response.details @@ -5542,7 +5542,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws } /** - * + * * list or watch objects of kind Role * @return APIlistRoleForAllNamespacesRequest * @http.response.details @@ -5787,7 +5787,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) thr } /** - * + * * partially update the specified ClusterRole * @param name name of the ClusterRole (required) * @param body (required) @@ -6035,7 +6035,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callba } /** - * + * * partially update the specified ClusterRoleBinding * @param name name of the ClusterRoleBinding (required) * @param body (required) @@ -6291,7 +6291,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * partially update the specified Role * @param name name of the Role (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -6548,7 +6548,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) thr } /** - * + * * partially update the specified RoleBinding * @param name name of the RoleBinding (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -6725,7 +6725,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) thr } /** - * + * * read the specified ClusterRole * @param name name of the ClusterRole (required) * @return APIreadClusterRoleRequest @@ -6899,7 +6899,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callba } /** - * + * * read the specified ClusterRoleBinding * @param name name of the ClusterRoleBinding (required) * @return APIreadClusterRoleBindingRequest @@ -7081,7 +7081,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * read the specified Role * @param name name of the Role (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -7264,7 +7264,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) thr } /** - * + * * read the specified RoleBinding * @param name name of the RoleBinding (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -7496,7 +7496,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) thr } /** - * + * * replace the specified ClusterRole * @param name name of the ClusterRole (required) * @param body (required) @@ -7729,7 +7729,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callba } /** - * + * * replace the specified ClusterRoleBinding * @param name name of the ClusterRoleBinding (required) * @param body (required) @@ -7970,7 +7970,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * replace the specified Role * @param name name of the Role (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -8212,7 +8212,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) thr } /** - * + * * replace the specified RoleBinding * @param name name of the RoleBinding (required) * @param namespace object name and auth scope, such as for teams and projects (required) diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/ResourceApi.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/ResourceApi.java index 19de342efd..6d88a55a93 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/ResourceApi.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/ResourceApi.java @@ -1,15 +1,16 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.apis; import io.kubernetes.client.openapi.ApiCallback; @@ -33,7 +34,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import jakarta.ws.rs.core.GenericType; public class ResourceApi { private ApiClient localVarApiClient; @@ -209,7 +209,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws } /** - * + * * get information of a group * @return APIgetAPIGroupRequest * @http.response.details diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/ResourceV1alpha2Api.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/ResourceV1alpha2Api.java index 462625603c..9e4bce803f 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/ResourceV1alpha2Api.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/ResourceV1alpha2Api.java @@ -1,15 +1,16 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.apis; import io.kubernetes.client.openapi.ApiCallback; @@ -50,7 +51,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import jakarta.ws.rs.core.GenericType; public class ResourceV1alpha2Api { private ApiClient localVarApiClient; @@ -310,7 +310,7 @@ public okhttp3.Call executeAsync(final ApiCallback } /** - * + * * create a PodSchedulingContext * @param namespace object name and auth scope, such as for teams and projects (required) * @param body (required) @@ -548,7 +548,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callb } /** - * + * * create a ResourceClaim * @param namespace object name and auth scope, such as for teams and projects (required) * @param body (required) @@ -786,7 +786,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callb } /** - * + * * create a ResourceClass * @param body (required) * @return APIcreateResourceClassRequest @@ -1721,7 +1721,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callb } /** - * + * * create a ResourceSlice * @param body (required) * @return APIcreateResourceSliceRequest @@ -2089,7 +2089,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete collection of PodSchedulingContext * @param namespace object name and auth scope, such as for teams and projects (required) * @return APIdeleteCollectionNamespacedPodSchedulingContextRequest @@ -2455,7 +2455,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete collection of ResourceClaim * @param namespace object name and auth scope, such as for teams and projects (required) * @return APIdeleteCollectionNamespacedResourceClaimRequest @@ -2821,7 +2821,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete collection of ResourceClaimParameters * @param namespace object name and auth scope, such as for teams and projects (required) * @return APIdeleteCollectionNamespacedResourceClaimParametersRequest @@ -3187,7 +3187,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete collection of ResourceClaimTemplate * @param namespace object name and auth scope, such as for teams and projects (required) * @return APIdeleteCollectionNamespacedResourceClaimTemplateRequest @@ -3553,7 +3553,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete collection of ResourceClassParameters * @param namespace object name and auth scope, such as for teams and projects (required) * @return APIdeleteCollectionNamespacedResourceClassParametersRequest @@ -3911,7 +3911,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete collection of ResourceClass * @return APIdeleteCollectionResourceClassRequest * @http.response.details @@ -4268,7 +4268,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete collection of ResourceSlice * @return APIdeleteCollectionResourceSliceRequest * @http.response.details @@ -4525,7 +4525,7 @@ public okhttp3.Call executeAsync(final ApiCallback } /** - * + * * delete a PodSchedulingContext * @param name name of the PodSchedulingContext (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -4785,7 +4785,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callb } /** - * + * * delete a ResourceClaim * @param name name of the ResourceClaim (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -5045,7 +5045,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callb } /** - * + * * delete a ResourceClass * @param name name of the ResourceClass (required) * @return APIdeleteResourceClassRequest @@ -6068,7 +6068,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callb } /** - * + * * delete a ResourceSlice * @param name name of the ResourceSlice (required) * @return APIdeleteResourceSliceRequest @@ -6220,7 +6220,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) } /** - * + * * get available resources * @return APIgetAPIResourcesRequest * @http.response.details @@ -6545,7 +6545,7 @@ public okhttp3.Call executeAsync(final ApiCallback _c } /** - * + * * list or watch objects of kind ResourceClaim * @param namespace object name and auth scope, such as for teams and projects (required) * @return APIlistNamespacedResourceClaimRequest @@ -7197,7 +7197,7 @@ public okhttp3.Call executeAsync(final ApiCallback _c } /** - * + * * list or watch objects of kind ResourceClaim * @return APIlistResourceClaimForAllNamespacesRequest * @http.response.details @@ -8801,7 +8801,7 @@ public okhttp3.Call executeAsync(final ApiCallback _c } /** - * + * * list or watch objects of kind ResourceClass * @return APIlistResourceClassRequest * @http.response.details @@ -9752,7 +9752,7 @@ public okhttp3.Call executeAsync(final ApiCallback _c } /** - * + * * list or watch objects of kind ResourceSlice * @return APIlistResourceSliceRequest * @http.response.details @@ -10322,7 +10322,7 @@ public okhttp3.Call executeAsync(final ApiCallback } /** - * + * * partially update the specified PodSchedulingContext * @param name name of the PodSchedulingContext (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -10579,7 +10579,7 @@ public okhttp3.Call executeAsync(final ApiCallback } /** - * + * * partially update status of the specified PodSchedulingContext * @param name name of the PodSchedulingContext (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -10836,7 +10836,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callb } /** - * + * * partially update the specified ResourceClaim * @param name name of the ResourceClaim (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -11093,7 +11093,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callb } /** - * + * * partially update status of the specified ResourceClaim * @param name name of the ResourceClaim (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -11607,7 +11607,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callb } /** - * + * * partially update the specified ResourceClass * @param name name of the ResourceClass (required) * @param body (required) @@ -12361,7 +12361,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callb } /** - * + * * partially update the specified ResourceSlice * @param name name of the ResourceSlice (required) * @param body (required) @@ -12545,7 +12545,7 @@ public okhttp3.Call executeAsync(final ApiCallback } /** - * + * * read the specified PodSchedulingContext * @param name name of the PodSchedulingContext (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -12728,7 +12728,7 @@ public okhttp3.Call executeAsync(final ApiCallback } /** - * + * * read status of the specified PodSchedulingContext * @param name name of the PodSchedulingContext (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -12911,7 +12911,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callb } /** - * + * * read the specified ResourceClaim * @param name name of the ResourceClaim (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -13094,7 +13094,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callb } /** - * + * * read status of the specified ResourceClaim * @param name name of the ResourceClaim (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -13460,7 +13460,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callb } /** - * + * * read the specified ResourceClass * @param name name of the ResourceClass (required) * @return APIreadResourceClassRequest @@ -13992,7 +13992,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callb } /** - * + * * read the specified ResourceSlice * @param name name of the ResourceSlice (required) * @return APIreadResourceSliceRequest @@ -14231,7 +14231,7 @@ public okhttp3.Call executeAsync(final ApiCallback } /** - * + * * replace the specified PodSchedulingContext * @param name name of the PodSchedulingContext (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -14473,7 +14473,7 @@ public okhttp3.Call executeAsync(final ApiCallback } /** - * + * * replace status of the specified PodSchedulingContext * @param name name of the PodSchedulingContext (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -14715,7 +14715,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callb } /** - * + * * replace the specified ResourceClaim * @param name name of the ResourceClaim (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -14957,7 +14957,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callb } /** - * + * * replace status of the specified ResourceClaim * @param name name of the ResourceClaim (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -15441,7 +15441,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callb } /** - * + * * replace the specified ResourceClass * @param name name of the ResourceClass (required) * @param body (required) @@ -16150,7 +16150,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callb } /** - * + * * replace the specified ResourceSlice * @param name name of the ResourceSlice (required) * @param body (required) diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/SchedulingApi.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/SchedulingApi.java index 708aa1d890..dd9e55cf52 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/SchedulingApi.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/SchedulingApi.java @@ -1,15 +1,16 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.apis; import io.kubernetes.client.openapi.ApiCallback; @@ -33,7 +34,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import jakarta.ws.rs.core.GenericType; public class SchedulingApi { private ApiClient localVarApiClient; @@ -209,7 +209,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws } /** - * + * * get information of a group * @return APIgetAPIGroupRequest * @http.response.details diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/SchedulingV1Api.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/SchedulingV1Api.java index 5164cb0f1b..8f8e1beb3e 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/SchedulingV1Api.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/SchedulingV1Api.java @@ -1,15 +1,16 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.apis; import io.kubernetes.client.openapi.ApiCallback; @@ -38,7 +39,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import jakarta.ws.rs.core.GenericType; public class SchedulingV1Api { private ApiClient localVarApiClient; @@ -290,7 +290,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) t } /** - * + * * create a PriorityClass * @param body (required) * @return APIcreatePriorityClassRequest @@ -650,7 +650,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete collection of PriorityClass * @return APIdeleteCollectionPriorityClassRequest * @http.response.details @@ -899,7 +899,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete a PriorityClass * @param name name of the PriorityClass (required) * @return APIdeletePriorityClassRequest @@ -1051,7 +1051,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) } /** - * + * * get available resources * @return APIgetAPIResourcesRequest * @http.response.details @@ -1368,7 +1368,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callbac } /** - * + * * list or watch objects of kind PriorityClass * @return APIlistPriorityClassRequest * @http.response.details @@ -1613,7 +1613,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) t } /** - * + * * partially update the specified PriorityClass * @param name name of the PriorityClass (required) * @param body (required) @@ -1789,7 +1789,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) t } /** - * + * * read the specified PriorityClass * @param name name of the PriorityClass (required) * @return APIreadPriorityClassRequest @@ -2020,7 +2020,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) t } /** - * + * * replace the specified PriorityClass * @param name name of the PriorityClass (required) * @param body (required) diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/StorageApi.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/StorageApi.java index 8868ee292a..217865ecec 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/StorageApi.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/StorageApi.java @@ -1,15 +1,16 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.apis; import io.kubernetes.client.openapi.ApiCallback; @@ -33,7 +34,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import jakarta.ws.rs.core.GenericType; public class StorageApi { private ApiClient localVarApiClient; @@ -209,7 +209,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws } /** - * + * * get information of a group * @return APIgetAPIGroupRequest * @http.response.details diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/StorageV1Api.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/StorageV1Api.java index b05b20b9fa..3f672128f2 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/StorageV1Api.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/StorageV1Api.java @@ -1,15 +1,16 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.apis; import io.kubernetes.client.openapi.ApiCallback; @@ -46,7 +47,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import jakarta.ws.rs.core.GenericType; public class StorageV1Api { private ApiClient localVarApiClient; @@ -298,7 +298,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throw } /** - * + * * create a CSIDriver * @param body (required) * @return APIcreateCSIDriverRequest @@ -527,7 +527,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws } /** - * + * * create a CSINode * @param body (required) * @return APIcreateCSINodeRequest @@ -764,7 +764,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callba } /** - * + * * create a CSIStorageCapacity * @param namespace object name and auth scope, such as for teams and projects (required) * @param body (required) @@ -994,7 +994,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) th } /** - * + * * create a StorageClass * @param body (required) * @return APIcreateStorageClassRequest @@ -1223,7 +1223,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback } /** - * + * * create a VolumeAttachment * @param body (required) * @return APIcreateVolumeAttachmentRequest @@ -1475,7 +1475,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throw } /** - * + * * delete a CSIDriver * @param name name of the CSIDriver (required) * @return APIdeleteCSIDriverRequest @@ -1726,7 +1726,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws } /** - * + * * delete a CSINode * @param name name of the CSINode (required) * @return APIdeleteCSINodeRequest @@ -2085,7 +2085,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete collection of CSIDriver * @return APIdeleteCollectionCSIDriverRequest * @http.response.details @@ -2442,7 +2442,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete collection of CSINode * @return APIdeleteCollectionCSINodeRequest * @http.response.details @@ -2807,7 +2807,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete collection of CSIStorageCapacity * @param namespace object name and auth scope, such as for teams and projects (required) * @return APIdeleteCollectionNamespacedCSIStorageCapacityRequest @@ -3165,7 +3165,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete collection of StorageClass * @return APIdeleteCollectionStorageClassRequest * @http.response.details @@ -3522,7 +3522,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete collection of VolumeAttachment * @return APIdeleteCollectionVolumeAttachmentRequest * @http.response.details @@ -3779,7 +3779,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete a CSIStorageCapacity * @param name name of the CSIStorageCapacity (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -4031,7 +4031,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) th } /** - * + * * delete a StorageClass * @param name name of the StorageClass (required) * @return APIdeleteStorageClassRequest @@ -4282,7 +4282,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback } /** - * + * * delete a VolumeAttachment * @param name name of the VolumeAttachment (required) * @return APIdeleteVolumeAttachmentRequest @@ -4434,7 +4434,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) } /** - * + * * get available resources * @return APIgetAPIResourcesRequest * @http.response.details @@ -4751,7 +4751,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) t } /** - * + * * list or watch objects of kind CSIDriver * @return APIlistCSIDriverRequest * @http.response.details @@ -5068,7 +5068,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) thr } /** - * + * * list or watch objects of kind CSINode * @return APIlistCSINodeRequest * @http.response.details @@ -5385,7 +5385,7 @@ public okhttp3.Call executeAsync(final ApiCallback _ca } /** - * + * * list or watch objects of kind CSIStorageCapacity * @return APIlistCSIStorageCapacityForAllNamespacesRequest * @http.response.details @@ -5710,7 +5710,7 @@ public okhttp3.Call executeAsync(final ApiCallback _ca } /** - * + * * list or watch objects of kind CSIStorageCapacity * @param namespace object name and auth scope, such as for teams and projects (required) * @return APIlistNamespacedCSIStorageCapacityRequest @@ -6028,7 +6028,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback } /** - * + * * list or watch objects of kind StorageClass * @return APIlistStorageClassRequest * @http.response.details @@ -6345,7 +6345,7 @@ public okhttp3.Call executeAsync(final ApiCallback _call } /** - * + * * list or watch objects of kind VolumeAttachment * @return APIlistVolumeAttachmentRequest * @http.response.details @@ -6590,7 +6590,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throw } /** - * + * * partially update the specified CSIDriver * @param name name of the CSIDriver (required) * @param body (required) @@ -6838,7 +6838,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws } /** - * + * * partially update the specified CSINode * @param name name of the CSINode (required) * @param body (required) @@ -7094,7 +7094,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callba } /** - * + * * partially update the specified CSIStorageCapacity * @param name name of the CSIStorageCapacity (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -7343,7 +7343,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) th } /** - * + * * partially update the specified StorageClass * @param name name of the StorageClass (required) * @param body (required) @@ -7591,7 +7591,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback } /** - * + * * partially update the specified VolumeAttachment * @param name name of the VolumeAttachment (required) * @param body (required) @@ -7839,7 +7839,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback } /** - * + * * partially update status of the specified VolumeAttachment * @param name name of the VolumeAttachment (required) * @param body (required) @@ -8015,7 +8015,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throw } /** - * + * * read the specified CSIDriver * @param name name of the CSIDriver (required) * @return APIreadCSIDriverRequest @@ -8189,7 +8189,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws } /** - * + * * read the specified CSINode * @param name name of the CSINode (required) * @return APIreadCSINodeRequest @@ -8371,7 +8371,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callba } /** - * + * * read the specified CSIStorageCapacity * @param name name of the CSIStorageCapacity (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -8546,7 +8546,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) th } /** - * + * * read the specified StorageClass * @param name name of the StorageClass (required) * @return APIreadStorageClassRequest @@ -8720,7 +8720,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback } /** - * + * * read the specified VolumeAttachment * @param name name of the VolumeAttachment (required) * @return APIreadVolumeAttachmentRequest @@ -8894,7 +8894,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback } /** - * + * * read status of the specified VolumeAttachment * @param name name of the VolumeAttachment (required) * @return APIreadVolumeAttachmentStatusRequest @@ -9125,7 +9125,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throw } /** - * + * * replace the specified CSIDriver * @param name name of the CSIDriver (required) * @param body (required) @@ -9358,7 +9358,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws } /** - * + * * replace the specified CSINode * @param name name of the CSINode (required) * @param body (required) @@ -9599,7 +9599,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callba } /** - * + * * replace the specified CSIStorageCapacity * @param name name of the CSIStorageCapacity (required) * @param namespace object name and auth scope, such as for teams and projects (required) @@ -9833,7 +9833,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) th } /** - * + * * replace the specified StorageClass * @param name name of the StorageClass (required) * @param body (required) @@ -10066,7 +10066,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback } /** - * + * * replace the specified VolumeAttachment * @param name name of the VolumeAttachment (required) * @param body (required) @@ -10299,7 +10299,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback } /** - * + * * replace status of the specified VolumeAttachment * @param name name of the VolumeAttachment (required) * @param body (required) diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/StorageV1alpha1Api.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/StorageV1alpha1Api.java index b1136040df..e3dd9a9af9 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/StorageV1alpha1Api.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/StorageV1alpha1Api.java @@ -1,15 +1,16 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.apis; import io.kubernetes.client.openapi.ApiCallback; @@ -38,7 +39,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import jakarta.ws.rs.core.GenericType; public class StorageV1alpha1Api { private ApiClient localVarApiClient; @@ -290,7 +290,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete collection of VolumeAttributesClass * @return APIdeleteCollectionVolumeAttributesClassRequest * @http.response.details @@ -899,7 +899,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) } /** - * + * * get available resources * @return APIgetAPIResourcesRequest * @http.response.details @@ -1368,7 +1368,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws } /** - * + * * get information of a group * @return APIgetAPIGroupRequest * @http.response.details diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/StoragemigrationV1alpha1Api.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/StoragemigrationV1alpha1Api.java index 2acf0ceca5..5d06d55492 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/StoragemigrationV1alpha1Api.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/StoragemigrationV1alpha1Api.java @@ -1,15 +1,16 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.apis; import io.kubernetes.client.openapi.ApiCallback; @@ -38,7 +39,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import jakarta.ws.rs.core.GenericType; public class StoragemigrationV1alpha1Api { private ApiClient localVarApiClient; @@ -290,7 +290,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete collection of StorageVersionMigration * @return APIdeleteCollectionStorageVersionMigrationRequest * @http.response.details @@ -899,7 +899,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws A } /** - * + * * delete a StorageVersionMigration * @param name name of the StorageVersionMigration (required) * @return APIdeleteStorageVersionMigrationRequest @@ -1051,7 +1051,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) } /** - * + * * get available resources * @return APIgetAPIResourcesRequest * @http.response.details @@ -1368,7 +1368,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throw } /** - * + * * get the code version * @return APIgetCodeRequest * @http.response.details diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/WellKnownApi.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/WellKnownApi.java index 3cc3bc204e..bfc1f4fc4f 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/WellKnownApi.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/WellKnownApi.java @@ -1,15 +1,16 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.apis; import io.kubernetes.client.openapi.ApiCallback; @@ -32,7 +33,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import jakarta.ws.rs.core.GenericType; public class WellKnownApi { private ApiClient localVarApiClient; @@ -206,7 +206,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api } /** - * + * * get service account issuer OpenID configuration, also known as the 'OIDC discovery doc' * @return APIgetServiceAccountIssuerOpenIDConfigurationRequest * @http.response.details diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/auth/ApiKeyAuth.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/auth/ApiKeyAuth.java index b2d070b601..9d3a897b12 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/auth/ApiKeyAuth.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/auth/ApiKeyAuth.java @@ -1,15 +1,16 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.auth; import io.kubernetes.client.openapi.ApiException; @@ -19,7 +20,7 @@ import java.util.Map; import java.util.List; -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class ApiKeyAuth implements Authentication { private final String location; private final String paramName; diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/auth/Authentication.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/auth/Authentication.java index 44cf01b8b7..89491e672a 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/auth/Authentication.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/auth/Authentication.java @@ -1,15 +1,16 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.auth; import io.kubernetes.client.openapi.Pair; diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/auth/HttpBasicAuth.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/auth/HttpBasicAuth.java index 88e8a6258e..2fe2de3484 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/auth/HttpBasicAuth.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/auth/HttpBasicAuth.java @@ -1,15 +1,16 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.auth; import io.kubernetes.client.openapi.Pair; diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/auth/HttpBearerAuth.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/auth/HttpBearerAuth.java index 5f98c7cd67..04132abcde 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/auth/HttpBearerAuth.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/auth/HttpBearerAuth.java @@ -1,28 +1,31 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.auth; import io.kubernetes.client.openapi.ApiException; import io.kubernetes.client.openapi.Pair; import java.net.URI; -import java.util.Map; import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.function.Supplier; -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class HttpBearerAuth implements Authentication { private final String scheme; - private String bearerToken; + private Supplier tokenSupplier; public HttpBearerAuth(String scheme) { this.scheme = scheme; @@ -34,7 +37,7 @@ public HttpBearerAuth(String scheme) { * @return The bearer token */ public String getBearerToken() { - return bearerToken; + return tokenSupplier.get(); } /** @@ -43,12 +46,22 @@ public String getBearerToken() { * @param bearerToken The bearer token to send in the Authorization header */ public void setBearerToken(String bearerToken) { - this.bearerToken = bearerToken; + this.tokenSupplier = () -> bearerToken; + } + + /** + * Sets the supplier of tokens, which together with the scheme, will be sent as the value of the Authorization header. + * + * @param tokenSupplier The supplier of bearer tokens to send in the Authorization header + */ + public void setBearerToken(Supplier tokenSupplier) { + this.tokenSupplier = tokenSupplier; } @Override public void applyToParams(List queryParams, Map headerParams, Map cookieParams, String payload, String method, URI uri) throws ApiException { + String bearerToken = Optional.ofNullable(tokenSupplier).map(Supplier::get).orElse(null); if (bearerToken == null) { return; } diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/AbstractOpenApiSchema.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/AbstractOpenApiSchema.java index c755ba784b..39b9173042 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/AbstractOpenApiSchema.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/AbstractOpenApiSchema.java @@ -1,29 +1,27 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import io.kubernetes.client.openapi.ApiException; import java.util.Objects; import java.lang.reflect.Type; import java.util.Map; -import jakarta.ws.rs.core.GenericType; - -//import com.fasterxml.jackson.annotation.JsonValue; /** * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public abstract class AbstractOpenApiSchema { // store the actual instance of the schema/object @@ -45,7 +43,7 @@ public AbstractOpenApiSchema(String schemaType, Boolean isNullable) { * * @return an instance of the actual schema/object */ - public abstract Map getSchemas(); + public abstract Map> getSchemas(); /** * Get the actual instance diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/AdmissionregistrationV1ServiceReference.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/AdmissionregistrationV1ServiceReference.java index 9e298e4f81..f855783505 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/AdmissionregistrationV1ServiceReference.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/AdmissionregistrationV1ServiceReference.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * ServiceReference holds a reference to Service.legacy.k8s.io */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class AdmissionregistrationV1ServiceReference { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) @@ -71,7 +71,6 @@ public AdmissionregistrationV1ServiceReference() { } public AdmissionregistrationV1ServiceReference name(String name) { - this.name = name; return this; } @@ -85,14 +84,12 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } public AdmissionregistrationV1ServiceReference namespace(String namespace) { - this.namespace = namespace; return this; } @@ -106,14 +103,12 @@ public String getNamespace() { return namespace; } - public void setNamespace(String namespace) { this.namespace = namespace; } public AdmissionregistrationV1ServiceReference path(String path) { - this.path = path; return this; } @@ -127,14 +122,12 @@ public String getPath() { return path; } - public void setPath(String path) { this.path = path; } public AdmissionregistrationV1ServiceReference port(Integer port) { - this.port = port; return this; } @@ -148,7 +141,6 @@ public Integer getPort() { return port; } - public void setPort(Integer port) { this.port = port; } @@ -217,32 +209,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to AdmissionregistrationV1ServiceReference + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AdmissionregistrationV1ServiceReference */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!AdmissionregistrationV1ServiceReference.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AdmissionregistrationV1ServiceReference.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in AdmissionregistrationV1ServiceReference is not found in the empty JSON string", AdmissionregistrationV1ServiceReference.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!AdmissionregistrationV1ServiceReference.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AdmissionregistrationV1ServiceReference` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AdmissionregistrationV1ServiceReference` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : AdmissionregistrationV1ServiceReference.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } @@ -274,9 +267,9 @@ public void write(JsonWriter out, AdmissionregistrationV1ServiceReference value) @Override public AdmissionregistrationV1ServiceReference read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -303,3 +296,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/AdmissionregistrationV1WebhookClientConfig.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/AdmissionregistrationV1WebhookClientConfig.java index 51099f6b8e..b5d6054e66 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/AdmissionregistrationV1WebhookClientConfig.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/AdmissionregistrationV1WebhookClientConfig.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.openapi.models.AdmissionregistrationV1ServiceReference; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * WebhookClientConfig contains the information to make a TLS connection with the webhook */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class AdmissionregistrationV1WebhookClientConfig { public static final String SERIALIZED_NAME_CA_BUNDLE = "caBundle"; @SerializedName(SERIALIZED_NAME_CA_BUNDLE) @@ -68,7 +68,6 @@ public AdmissionregistrationV1WebhookClientConfig() { } public AdmissionregistrationV1WebhookClientConfig caBundle(byte[] caBundle) { - this.caBundle = caBundle; return this; } @@ -82,14 +81,12 @@ public byte[] getCaBundle() { return caBundle; } - public void setCaBundle(byte[] caBundle) { this.caBundle = caBundle; } public AdmissionregistrationV1WebhookClientConfig service(AdmissionregistrationV1ServiceReference service) { - this.service = service; return this; } @@ -103,14 +100,12 @@ public AdmissionregistrationV1ServiceReference getService() { return service; } - public void setService(AdmissionregistrationV1ServiceReference service) { this.service = service; } public AdmissionregistrationV1WebhookClientConfig url(String url) { - this.url = url; return this; } @@ -124,7 +119,6 @@ public String getUrl() { return url; } - public void setUrl(String url) { this.url = url; } @@ -188,28 +182,29 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to AdmissionregistrationV1WebhookClientConfig + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AdmissionregistrationV1WebhookClientConfig */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!AdmissionregistrationV1WebhookClientConfig.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AdmissionregistrationV1WebhookClientConfig.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in AdmissionregistrationV1WebhookClientConfig is not found in the empty JSON string", AdmissionregistrationV1WebhookClientConfig.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!AdmissionregistrationV1WebhookClientConfig.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AdmissionregistrationV1WebhookClientConfig` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AdmissionregistrationV1WebhookClientConfig` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `service` if (jsonObj.get("service") != null && !jsonObj.get("service").isJsonNull()) { - AdmissionregistrationV1ServiceReference.validateJsonObject(jsonObj.getAsJsonObject("service")); + AdmissionregistrationV1ServiceReference.validateJsonElement(jsonObj.get("service")); } if ((jsonObj.get("url") != null && !jsonObj.get("url").isJsonNull()) && !jsonObj.get("url").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("url").toString())); @@ -236,9 +231,9 @@ public void write(JsonWriter out, AdmissionregistrationV1WebhookClientConfig val @Override public AdmissionregistrationV1WebhookClientConfig read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -265,3 +260,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/ApiextensionsV1ServiceReference.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/ApiextensionsV1ServiceReference.java index de5dd51de7..c10bdb6ea1 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/ApiextensionsV1ServiceReference.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/ApiextensionsV1ServiceReference.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * ServiceReference holds a reference to Service.legacy.k8s.io */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class ApiextensionsV1ServiceReference { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) @@ -71,7 +71,6 @@ public ApiextensionsV1ServiceReference() { } public ApiextensionsV1ServiceReference name(String name) { - this.name = name; return this; } @@ -85,14 +84,12 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } public ApiextensionsV1ServiceReference namespace(String namespace) { - this.namespace = namespace; return this; } @@ -106,14 +103,12 @@ public String getNamespace() { return namespace; } - public void setNamespace(String namespace) { this.namespace = namespace; } public ApiextensionsV1ServiceReference path(String path) { - this.path = path; return this; } @@ -127,14 +122,12 @@ public String getPath() { return path; } - public void setPath(String path) { this.path = path; } public ApiextensionsV1ServiceReference port(Integer port) { - this.port = port; return this; } @@ -148,7 +141,6 @@ public Integer getPort() { return port; } - public void setPort(Integer port) { this.port = port; } @@ -217,32 +209,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ApiextensionsV1ServiceReference + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ApiextensionsV1ServiceReference */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ApiextensionsV1ServiceReference.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ApiextensionsV1ServiceReference.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in ApiextensionsV1ServiceReference is not found in the empty JSON string", ApiextensionsV1ServiceReference.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!ApiextensionsV1ServiceReference.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ApiextensionsV1ServiceReference` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ApiextensionsV1ServiceReference` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : ApiextensionsV1ServiceReference.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } @@ -274,9 +267,9 @@ public void write(JsonWriter out, ApiextensionsV1ServiceReference value) throws @Override public ApiextensionsV1ServiceReference read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -303,3 +296,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/ApiextensionsV1WebhookClientConfig.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/ApiextensionsV1WebhookClientConfig.java index fe5af7f19c..acf9897e1f 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/ApiextensionsV1WebhookClientConfig.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/ApiextensionsV1WebhookClientConfig.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.openapi.models.ApiextensionsV1ServiceReference; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * WebhookClientConfig contains the information to make a TLS connection with the webhook. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class ApiextensionsV1WebhookClientConfig { public static final String SERIALIZED_NAME_CA_BUNDLE = "caBundle"; @SerializedName(SERIALIZED_NAME_CA_BUNDLE) @@ -68,7 +68,6 @@ public ApiextensionsV1WebhookClientConfig() { } public ApiextensionsV1WebhookClientConfig caBundle(byte[] caBundle) { - this.caBundle = caBundle; return this; } @@ -82,14 +81,12 @@ public byte[] getCaBundle() { return caBundle; } - public void setCaBundle(byte[] caBundle) { this.caBundle = caBundle; } public ApiextensionsV1WebhookClientConfig service(ApiextensionsV1ServiceReference service) { - this.service = service; return this; } @@ -103,14 +100,12 @@ public ApiextensionsV1ServiceReference getService() { return service; } - public void setService(ApiextensionsV1ServiceReference service) { this.service = service; } public ApiextensionsV1WebhookClientConfig url(String url) { - this.url = url; return this; } @@ -124,7 +119,6 @@ public String getUrl() { return url; } - public void setUrl(String url) { this.url = url; } @@ -188,28 +182,29 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ApiextensionsV1WebhookClientConfig + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ApiextensionsV1WebhookClientConfig */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ApiextensionsV1WebhookClientConfig.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ApiextensionsV1WebhookClientConfig.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in ApiextensionsV1WebhookClientConfig is not found in the empty JSON string", ApiextensionsV1WebhookClientConfig.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!ApiextensionsV1WebhookClientConfig.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ApiextensionsV1WebhookClientConfig` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ApiextensionsV1WebhookClientConfig` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `service` if (jsonObj.get("service") != null && !jsonObj.get("service").isJsonNull()) { - ApiextensionsV1ServiceReference.validateJsonObject(jsonObj.getAsJsonObject("service")); + ApiextensionsV1ServiceReference.validateJsonElement(jsonObj.get("service")); } if ((jsonObj.get("url") != null && !jsonObj.get("url").isJsonNull()) && !jsonObj.get("url").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("url").toString())); @@ -236,9 +231,9 @@ public void write(JsonWriter out, ApiextensionsV1WebhookClientConfig value) thro @Override public ApiextensionsV1WebhookClientConfig read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -265,3 +260,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/ApiregistrationV1ServiceReference.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/ApiregistrationV1ServiceReference.java index 84638e323a..b8deb6709d 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/ApiregistrationV1ServiceReference.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/ApiregistrationV1ServiceReference.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * ServiceReference holds a reference to Service.legacy.k8s.io */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class ApiregistrationV1ServiceReference { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) @@ -67,7 +67,6 @@ public ApiregistrationV1ServiceReference() { } public ApiregistrationV1ServiceReference name(String name) { - this.name = name; return this; } @@ -81,14 +80,12 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } public ApiregistrationV1ServiceReference namespace(String namespace) { - this.namespace = namespace; return this; } @@ -102,14 +99,12 @@ public String getNamespace() { return namespace; } - public void setNamespace(String namespace) { this.namespace = namespace; } public ApiregistrationV1ServiceReference port(Integer port) { - this.port = port; return this; } @@ -123,7 +118,6 @@ public Integer getPort() { return port; } - public void setPort(Integer port) { this.port = port; } @@ -187,25 +181,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ApiregistrationV1ServiceReference + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ApiregistrationV1ServiceReference */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ApiregistrationV1ServiceReference.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ApiregistrationV1ServiceReference.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in ApiregistrationV1ServiceReference is not found in the empty JSON string", ApiregistrationV1ServiceReference.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!ApiregistrationV1ServiceReference.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ApiregistrationV1ServiceReference` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ApiregistrationV1ServiceReference` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } @@ -234,9 +229,9 @@ public void write(JsonWriter out, ApiregistrationV1ServiceReference value) throw @Override public ApiregistrationV1ServiceReference read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -263,3 +258,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/AuthenticationV1TokenRequest.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/AuthenticationV1TokenRequest.java index 3ec74e43b7..e92564fa8c 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/AuthenticationV1TokenRequest.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/AuthenticationV1TokenRequest.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1TokenRequestSpec; import io.kubernetes.client.openapi.models.V1TokenRequestStatus; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * TokenRequest requests a token for a given service account. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class AuthenticationV1TokenRequest implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -78,7 +78,6 @@ public AuthenticationV1TokenRequest() { } public AuthenticationV1TokenRequest apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -92,14 +91,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public AuthenticationV1TokenRequest kind(String kind) { - this.kind = kind; return this; } @@ -113,14 +110,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public AuthenticationV1TokenRequest metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -134,14 +129,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public AuthenticationV1TokenRequest spec(V1TokenRequestSpec spec) { - this.spec = spec; return this; } @@ -155,14 +148,12 @@ public V1TokenRequestSpec getSpec() { return spec; } - public void setSpec(V1TokenRequestSpec spec) { this.spec = spec; } public AuthenticationV1TokenRequest status(V1TokenRequestStatus status) { - this.status = status; return this; } @@ -176,7 +167,6 @@ public V1TokenRequestStatus getStatus() { return status; } - public void setStatus(V1TokenRequestStatus status) { this.status = status; } @@ -247,32 +237,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to AuthenticationV1TokenRequest + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AuthenticationV1TokenRequest */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!AuthenticationV1TokenRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AuthenticationV1TokenRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in AuthenticationV1TokenRequest is not found in the empty JSON string", AuthenticationV1TokenRequest.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!AuthenticationV1TokenRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AuthenticationV1TokenRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AuthenticationV1TokenRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : AuthenticationV1TokenRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -281,13 +272,13 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } // validate the required field `spec` - V1TokenRequestSpec.validateJsonObject(jsonObj.getAsJsonObject("spec")); + V1TokenRequestSpec.validateJsonElement(jsonObj.get("spec")); // validate the optional field `status` if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { - V1TokenRequestStatus.validateJsonObject(jsonObj.getAsJsonObject("status")); + V1TokenRequestStatus.validateJsonElement(jsonObj.get("status")); } } @@ -311,9 +302,9 @@ public void write(JsonWriter out, AuthenticationV1TokenRequest value) throws IOE @Override public AuthenticationV1TokenRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -340,3 +331,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/CoreV1EndpointPort.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/CoreV1EndpointPort.java index ead34e1264..9fa0da140b 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/CoreV1EndpointPort.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/CoreV1EndpointPort.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * EndpointPort is a tuple that describes a single port. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class CoreV1EndpointPort { public static final String SERIALIZED_NAME_APP_PROTOCOL = "appProtocol"; @SerializedName(SERIALIZED_NAME_APP_PROTOCOL) @@ -71,7 +71,6 @@ public CoreV1EndpointPort() { } public CoreV1EndpointPort appProtocol(String appProtocol) { - this.appProtocol = appProtocol; return this; } @@ -85,14 +84,12 @@ public String getAppProtocol() { return appProtocol; } - public void setAppProtocol(String appProtocol) { this.appProtocol = appProtocol; } public CoreV1EndpointPort name(String name) { - this.name = name; return this; } @@ -106,14 +103,12 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } public CoreV1EndpointPort port(Integer port) { - this.port = port; return this; } @@ -127,14 +122,12 @@ public Integer getPort() { return port; } - public void setPort(Integer port) { this.port = port; } public CoreV1EndpointPort protocol(String protocol) { - this.protocol = protocol; return this; } @@ -148,7 +141,6 @@ public String getProtocol() { return protocol; } - public void setProtocol(String protocol) { this.protocol = protocol; } @@ -216,32 +208,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CoreV1EndpointPort + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CoreV1EndpointPort */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CoreV1EndpointPort.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CoreV1EndpointPort.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in CoreV1EndpointPort is not found in the empty JSON string", CoreV1EndpointPort.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!CoreV1EndpointPort.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CoreV1EndpointPort` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CoreV1EndpointPort` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : CoreV1EndpointPort.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("appProtocol") != null && !jsonObj.get("appProtocol").isJsonNull()) && !jsonObj.get("appProtocol").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `appProtocol` to be a primitive type in the JSON string but got `%s`", jsonObj.get("appProtocol").toString())); } @@ -273,9 +266,9 @@ public void write(JsonWriter out, CoreV1EndpointPort value) throws IOException { @Override public CoreV1EndpointPort read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -302,3 +295,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/CoreV1Event.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/CoreV1Event.java index 4c70dbbc16..901f55122f 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/CoreV1Event.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/CoreV1Event.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -25,6 +25,7 @@ import io.kubernetes.client.openapi.models.V1ObjectReference; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -46,7 +47,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -54,7 +54,7 @@ /** * Event is a report of an event somewhere in the cluster. Events have a limited retention time and triggers and messages may evolve with time. Event consumers should not rely on the timing of an event with a given Reason reflecting a consistent underlying trigger, or the continued existence of events with that Reason. Events should be treated as informative, best-effort, supplemental data. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class CoreV1Event implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_ACTION = "action"; @SerializedName(SERIALIZED_NAME_ACTION) @@ -128,7 +128,6 @@ public CoreV1Event() { } public CoreV1Event action(String action) { - this.action = action; return this; } @@ -142,14 +141,12 @@ public String getAction() { return action; } - public void setAction(String action) { this.action = action; } public CoreV1Event apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -163,14 +160,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public CoreV1Event count(Integer count) { - this.count = count; return this; } @@ -184,14 +179,12 @@ public Integer getCount() { return count; } - public void setCount(Integer count) { this.count = count; } public CoreV1Event eventTime(OffsetDateTime eventTime) { - this.eventTime = eventTime; return this; } @@ -205,14 +198,12 @@ public OffsetDateTime getEventTime() { return eventTime; } - public void setEventTime(OffsetDateTime eventTime) { this.eventTime = eventTime; } public CoreV1Event firstTimestamp(OffsetDateTime firstTimestamp) { - this.firstTimestamp = firstTimestamp; return this; } @@ -226,14 +217,12 @@ public OffsetDateTime getFirstTimestamp() { return firstTimestamp; } - public void setFirstTimestamp(OffsetDateTime firstTimestamp) { this.firstTimestamp = firstTimestamp; } public CoreV1Event involvedObject(V1ObjectReference involvedObject) { - this.involvedObject = involvedObject; return this; } @@ -247,14 +236,12 @@ public V1ObjectReference getInvolvedObject() { return involvedObject; } - public void setInvolvedObject(V1ObjectReference involvedObject) { this.involvedObject = involvedObject; } public CoreV1Event kind(String kind) { - this.kind = kind; return this; } @@ -268,14 +255,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public CoreV1Event lastTimestamp(OffsetDateTime lastTimestamp) { - this.lastTimestamp = lastTimestamp; return this; } @@ -289,14 +274,12 @@ public OffsetDateTime getLastTimestamp() { return lastTimestamp; } - public void setLastTimestamp(OffsetDateTime lastTimestamp) { this.lastTimestamp = lastTimestamp; } public CoreV1Event message(String message) { - this.message = message; return this; } @@ -310,14 +293,12 @@ public String getMessage() { return message; } - public void setMessage(String message) { this.message = message; } public CoreV1Event metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -331,14 +312,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public CoreV1Event reason(String reason) { - this.reason = reason; return this; } @@ -352,14 +331,12 @@ public String getReason() { return reason; } - public void setReason(String reason) { this.reason = reason; } public CoreV1Event related(V1ObjectReference related) { - this.related = related; return this; } @@ -373,14 +350,12 @@ public V1ObjectReference getRelated() { return related; } - public void setRelated(V1ObjectReference related) { this.related = related; } public CoreV1Event reportingComponent(String reportingComponent) { - this.reportingComponent = reportingComponent; return this; } @@ -394,14 +369,12 @@ public String getReportingComponent() { return reportingComponent; } - public void setReportingComponent(String reportingComponent) { this.reportingComponent = reportingComponent; } public CoreV1Event reportingInstance(String reportingInstance) { - this.reportingInstance = reportingInstance; return this; } @@ -415,14 +388,12 @@ public String getReportingInstance() { return reportingInstance; } - public void setReportingInstance(String reportingInstance) { this.reportingInstance = reportingInstance; } public CoreV1Event series(CoreV1EventSeries series) { - this.series = series; return this; } @@ -436,14 +407,12 @@ public CoreV1EventSeries getSeries() { return series; } - public void setSeries(CoreV1EventSeries series) { this.series = series; } public CoreV1Event source(V1EventSource source) { - this.source = source; return this; } @@ -457,14 +426,12 @@ public V1EventSource getSource() { return source; } - public void setSource(V1EventSource source) { this.source = source; } public CoreV1Event type(String type) { - this.type = type; return this; } @@ -478,7 +445,6 @@ public String getType() { return type; } - public void setType(String type) { this.type = type; } @@ -586,32 +552,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CoreV1Event + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CoreV1Event */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CoreV1Event.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CoreV1Event.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in CoreV1Event is not found in the empty JSON string", CoreV1Event.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!CoreV1Event.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CoreV1Event` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CoreV1Event` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : CoreV1Event.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("action") != null && !jsonObj.get("action").isJsonNull()) && !jsonObj.get("action").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `action` to be a primitive type in the JSON string but got `%s`", jsonObj.get("action").toString())); } @@ -619,7 +586,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } // validate the required field `involvedObject` - V1ObjectReference.validateJsonObject(jsonObj.getAsJsonObject("involvedObject")); + V1ObjectReference.validateJsonElement(jsonObj.get("involvedObject")); if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); } @@ -627,13 +594,13 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); } // validate the required field `metadata` - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); if ((jsonObj.get("reason") != null && !jsonObj.get("reason").isJsonNull()) && !jsonObj.get("reason").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `reason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reason").toString())); } // validate the optional field `related` if (jsonObj.get("related") != null && !jsonObj.get("related").isJsonNull()) { - V1ObjectReference.validateJsonObject(jsonObj.getAsJsonObject("related")); + V1ObjectReference.validateJsonElement(jsonObj.get("related")); } if ((jsonObj.get("reportingComponent") != null && !jsonObj.get("reportingComponent").isJsonNull()) && !jsonObj.get("reportingComponent").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `reportingComponent` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reportingComponent").toString())); @@ -643,11 +610,11 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `series` if (jsonObj.get("series") != null && !jsonObj.get("series").isJsonNull()) { - CoreV1EventSeries.validateJsonObject(jsonObj.getAsJsonObject("series")); + CoreV1EventSeries.validateJsonElement(jsonObj.get("series")); } // validate the optional field `source` if (jsonObj.get("source") != null && !jsonObj.get("source").isJsonNull()) { - V1EventSource.validateJsonObject(jsonObj.getAsJsonObject("source")); + V1EventSource.validateJsonElement(jsonObj.get("source")); } if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); @@ -674,9 +641,9 @@ public void write(JsonWriter out, CoreV1Event value) throws IOException { @Override public CoreV1Event read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -703,3 +670,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/CoreV1EventList.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/CoreV1EventList.java index 5c12736b50..dbb3e5c47b 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/CoreV1EventList.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/CoreV1EventList.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1ListMeta; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * EventList is a list of events. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class CoreV1EventList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -75,7 +75,6 @@ public CoreV1EventList() { } public CoreV1EventList apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -89,14 +88,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public CoreV1EventList items(List items) { - this.items = items; return this; } @@ -118,14 +115,12 @@ public List getItems() { return items; } - public void setItems(List items) { this.items = items; } public CoreV1EventList kind(String kind) { - this.kind = kind; return this; } @@ -139,14 +134,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public CoreV1EventList metadata(V1ListMeta metadata) { - this.metadata = metadata; return this; } @@ -160,7 +153,6 @@ public V1ListMeta getMetadata() { return metadata; } - public void setMetadata(V1ListMeta metadata) { this.metadata = metadata; } @@ -228,32 +220,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CoreV1EventList + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CoreV1EventList */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CoreV1EventList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CoreV1EventList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in CoreV1EventList is not found in the empty JSON string", CoreV1EventList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!CoreV1EventList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CoreV1EventList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CoreV1EventList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : CoreV1EventList.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -265,14 +258,14 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); // validate the required field `items` (array) for (int i = 0; i < jsonArrayitems.size(); i++) { - CoreV1Event.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject()); + CoreV1Event.validateJsonElement(jsonArrayitems.get(i)); }; if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ListMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ListMeta.validateJsonElement(jsonObj.get("metadata")); } } @@ -296,9 +289,9 @@ public void write(JsonWriter out, CoreV1EventList value) throws IOException { @Override public CoreV1EventList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -325,3 +318,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/CoreV1EventSeries.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/CoreV1EventSeries.java index 31a25dbe23..d08877c91d 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/CoreV1EventSeries.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/CoreV1EventSeries.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * EventSeries contain information on series of events, i.e. thing that was/is happening continuously for some time. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class CoreV1EventSeries { public static final String SERIALIZED_NAME_COUNT = "count"; @SerializedName(SERIALIZED_NAME_COUNT) @@ -64,7 +64,6 @@ public CoreV1EventSeries() { } public CoreV1EventSeries count(Integer count) { - this.count = count; return this; } @@ -78,14 +77,12 @@ public Integer getCount() { return count; } - public void setCount(Integer count) { this.count = count; } public CoreV1EventSeries lastObservedTime(OffsetDateTime lastObservedTime) { - this.lastObservedTime = lastObservedTime; return this; } @@ -99,7 +96,6 @@ public OffsetDateTime getLastObservedTime() { return lastObservedTime; } - public void setLastObservedTime(OffsetDateTime lastObservedTime) { this.lastObservedTime = lastObservedTime; } @@ -160,25 +156,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CoreV1EventSeries + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CoreV1EventSeries */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CoreV1EventSeries.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CoreV1EventSeries.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in CoreV1EventSeries is not found in the empty JSON string", CoreV1EventSeries.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!CoreV1EventSeries.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CoreV1EventSeries` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CoreV1EventSeries` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -201,9 +198,9 @@ public void write(JsonWriter out, CoreV1EventSeries value) throws IOException { @Override public CoreV1EventSeries read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -230,3 +227,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/DiscoveryV1EndpointPort.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/DiscoveryV1EndpointPort.java index 5dd6543429..650b240aeb 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/DiscoveryV1EndpointPort.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/DiscoveryV1EndpointPort.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * EndpointPort represents a Port used by an EndpointSlice */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class DiscoveryV1EndpointPort { public static final String SERIALIZED_NAME_APP_PROTOCOL = "appProtocol"; @SerializedName(SERIALIZED_NAME_APP_PROTOCOL) @@ -71,7 +71,6 @@ public DiscoveryV1EndpointPort() { } public DiscoveryV1EndpointPort appProtocol(String appProtocol) { - this.appProtocol = appProtocol; return this; } @@ -85,14 +84,12 @@ public String getAppProtocol() { return appProtocol; } - public void setAppProtocol(String appProtocol) { this.appProtocol = appProtocol; } public DiscoveryV1EndpointPort name(String name) { - this.name = name; return this; } @@ -106,14 +103,12 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } public DiscoveryV1EndpointPort port(Integer port) { - this.port = port; return this; } @@ -127,14 +122,12 @@ public Integer getPort() { return port; } - public void setPort(Integer port) { this.port = port; } public DiscoveryV1EndpointPort protocol(String protocol) { - this.protocol = protocol; return this; } @@ -148,7 +141,6 @@ public String getProtocol() { return protocol; } - public void setProtocol(String protocol) { this.protocol = protocol; } @@ -215,25 +207,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DiscoveryV1EndpointPort + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to DiscoveryV1EndpointPort */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DiscoveryV1EndpointPort.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!DiscoveryV1EndpointPort.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in DiscoveryV1EndpointPort is not found in the empty JSON string", DiscoveryV1EndpointPort.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!DiscoveryV1EndpointPort.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DiscoveryV1EndpointPort` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DiscoveryV1EndpointPort` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("appProtocol") != null && !jsonObj.get("appProtocol").isJsonNull()) && !jsonObj.get("appProtocol").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `appProtocol` to be a primitive type in the JSON string but got `%s`", jsonObj.get("appProtocol").toString())); } @@ -265,9 +258,9 @@ public void write(JsonWriter out, DiscoveryV1EndpointPort value) throws IOExcept @Override public DiscoveryV1EndpointPort read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -294,3 +287,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/EventsV1Event.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/EventsV1Event.java index 4e5367e41d..60223c6003 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/EventsV1Event.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/EventsV1Event.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -25,6 +25,7 @@ import io.kubernetes.client.openapi.models.V1ObjectReference; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -46,7 +47,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -54,7 +54,7 @@ /** * Event is a report of an event somewhere in the cluster. It generally denotes some state change in the system. Events have a limited retention time and triggers and messages may evolve with time. Event consumers should not rely on the timing of an event with a given Reason reflecting a consistent underlying trigger, or the continued existence of events with that Reason. Events should be treated as informative, best-effort, supplemental data. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class EventsV1Event implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_ACTION = "action"; @SerializedName(SERIALIZED_NAME_ACTION) @@ -128,7 +128,6 @@ public EventsV1Event() { } public EventsV1Event action(String action) { - this.action = action; return this; } @@ -142,14 +141,12 @@ public String getAction() { return action; } - public void setAction(String action) { this.action = action; } public EventsV1Event apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -163,14 +160,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public EventsV1Event deprecatedCount(Integer deprecatedCount) { - this.deprecatedCount = deprecatedCount; return this; } @@ -184,14 +179,12 @@ public Integer getDeprecatedCount() { return deprecatedCount; } - public void setDeprecatedCount(Integer deprecatedCount) { this.deprecatedCount = deprecatedCount; } public EventsV1Event deprecatedFirstTimestamp(OffsetDateTime deprecatedFirstTimestamp) { - this.deprecatedFirstTimestamp = deprecatedFirstTimestamp; return this; } @@ -205,14 +198,12 @@ public OffsetDateTime getDeprecatedFirstTimestamp() { return deprecatedFirstTimestamp; } - public void setDeprecatedFirstTimestamp(OffsetDateTime deprecatedFirstTimestamp) { this.deprecatedFirstTimestamp = deprecatedFirstTimestamp; } public EventsV1Event deprecatedLastTimestamp(OffsetDateTime deprecatedLastTimestamp) { - this.deprecatedLastTimestamp = deprecatedLastTimestamp; return this; } @@ -226,14 +217,12 @@ public OffsetDateTime getDeprecatedLastTimestamp() { return deprecatedLastTimestamp; } - public void setDeprecatedLastTimestamp(OffsetDateTime deprecatedLastTimestamp) { this.deprecatedLastTimestamp = deprecatedLastTimestamp; } public EventsV1Event deprecatedSource(V1EventSource deprecatedSource) { - this.deprecatedSource = deprecatedSource; return this; } @@ -247,14 +236,12 @@ public V1EventSource getDeprecatedSource() { return deprecatedSource; } - public void setDeprecatedSource(V1EventSource deprecatedSource) { this.deprecatedSource = deprecatedSource; } public EventsV1Event eventTime(OffsetDateTime eventTime) { - this.eventTime = eventTime; return this; } @@ -268,14 +255,12 @@ public OffsetDateTime getEventTime() { return eventTime; } - public void setEventTime(OffsetDateTime eventTime) { this.eventTime = eventTime; } public EventsV1Event kind(String kind) { - this.kind = kind; return this; } @@ -289,14 +274,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public EventsV1Event metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -310,14 +293,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public EventsV1Event note(String note) { - this.note = note; return this; } @@ -331,14 +312,12 @@ public String getNote() { return note; } - public void setNote(String note) { this.note = note; } public EventsV1Event reason(String reason) { - this.reason = reason; return this; } @@ -352,14 +331,12 @@ public String getReason() { return reason; } - public void setReason(String reason) { this.reason = reason; } public EventsV1Event regarding(V1ObjectReference regarding) { - this.regarding = regarding; return this; } @@ -373,14 +350,12 @@ public V1ObjectReference getRegarding() { return regarding; } - public void setRegarding(V1ObjectReference regarding) { this.regarding = regarding; } public EventsV1Event related(V1ObjectReference related) { - this.related = related; return this; } @@ -394,14 +369,12 @@ public V1ObjectReference getRelated() { return related; } - public void setRelated(V1ObjectReference related) { this.related = related; } public EventsV1Event reportingController(String reportingController) { - this.reportingController = reportingController; return this; } @@ -415,14 +388,12 @@ public String getReportingController() { return reportingController; } - public void setReportingController(String reportingController) { this.reportingController = reportingController; } public EventsV1Event reportingInstance(String reportingInstance) { - this.reportingInstance = reportingInstance; return this; } @@ -436,14 +407,12 @@ public String getReportingInstance() { return reportingInstance; } - public void setReportingInstance(String reportingInstance) { this.reportingInstance = reportingInstance; } public EventsV1Event series(EventsV1EventSeries series) { - this.series = series; return this; } @@ -457,14 +426,12 @@ public EventsV1EventSeries getSeries() { return series; } - public void setSeries(EventsV1EventSeries series) { this.series = series; } public EventsV1Event type(String type) { - this.type = type; return this; } @@ -478,7 +445,6 @@ public String getType() { return type; } - public void setType(String type) { this.type = type; } @@ -585,32 +551,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to EventsV1Event + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to EventsV1Event */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!EventsV1Event.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!EventsV1Event.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in EventsV1Event is not found in the empty JSON string", EventsV1Event.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!EventsV1Event.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `EventsV1Event` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `EventsV1Event` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : EventsV1Event.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("action") != null && !jsonObj.get("action").isJsonNull()) && !jsonObj.get("action").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `action` to be a primitive type in the JSON string but got `%s`", jsonObj.get("action").toString())); } @@ -619,14 +586,14 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `deprecatedSource` if (jsonObj.get("deprecatedSource") != null && !jsonObj.get("deprecatedSource").isJsonNull()) { - V1EventSource.validateJsonObject(jsonObj.getAsJsonObject("deprecatedSource")); + V1EventSource.validateJsonElement(jsonObj.get("deprecatedSource")); } if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } if ((jsonObj.get("note") != null && !jsonObj.get("note").isJsonNull()) && !jsonObj.get("note").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `note` to be a primitive type in the JSON string but got `%s`", jsonObj.get("note").toString())); @@ -636,11 +603,11 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `regarding` if (jsonObj.get("regarding") != null && !jsonObj.get("regarding").isJsonNull()) { - V1ObjectReference.validateJsonObject(jsonObj.getAsJsonObject("regarding")); + V1ObjectReference.validateJsonElement(jsonObj.get("regarding")); } // validate the optional field `related` if (jsonObj.get("related") != null && !jsonObj.get("related").isJsonNull()) { - V1ObjectReference.validateJsonObject(jsonObj.getAsJsonObject("related")); + V1ObjectReference.validateJsonElement(jsonObj.get("related")); } if ((jsonObj.get("reportingController") != null && !jsonObj.get("reportingController").isJsonNull()) && !jsonObj.get("reportingController").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `reportingController` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reportingController").toString())); @@ -650,7 +617,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `series` if (jsonObj.get("series") != null && !jsonObj.get("series").isJsonNull()) { - EventsV1EventSeries.validateJsonObject(jsonObj.getAsJsonObject("series")); + EventsV1EventSeries.validateJsonElement(jsonObj.get("series")); } if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); @@ -677,9 +644,9 @@ public void write(JsonWriter out, EventsV1Event value) throws IOException { @Override public EventsV1Event read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -706,3 +673,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/EventsV1EventList.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/EventsV1EventList.java index 6c022b452c..74231a4d36 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/EventsV1EventList.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/EventsV1EventList.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1ListMeta; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * EventList is a list of Event objects. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class EventsV1EventList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -75,7 +75,6 @@ public EventsV1EventList() { } public EventsV1EventList apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -89,14 +88,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public EventsV1EventList items(List items) { - this.items = items; return this; } @@ -118,14 +115,12 @@ public List getItems() { return items; } - public void setItems(List items) { this.items = items; } public EventsV1EventList kind(String kind) { - this.kind = kind; return this; } @@ -139,14 +134,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public EventsV1EventList metadata(V1ListMeta metadata) { - this.metadata = metadata; return this; } @@ -160,7 +153,6 @@ public V1ListMeta getMetadata() { return metadata; } - public void setMetadata(V1ListMeta metadata) { this.metadata = metadata; } @@ -228,32 +220,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to EventsV1EventList + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to EventsV1EventList */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!EventsV1EventList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!EventsV1EventList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in EventsV1EventList is not found in the empty JSON string", EventsV1EventList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!EventsV1EventList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `EventsV1EventList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `EventsV1EventList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : EventsV1EventList.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -265,14 +258,14 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); // validate the required field `items` (array) for (int i = 0; i < jsonArrayitems.size(); i++) { - EventsV1Event.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject()); + EventsV1Event.validateJsonElement(jsonArrayitems.get(i)); }; if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ListMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ListMeta.validateJsonElement(jsonObj.get("metadata")); } } @@ -296,9 +289,9 @@ public void write(JsonWriter out, EventsV1EventList value) throws IOException { @Override public EventsV1EventList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -325,3 +318,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/EventsV1EventSeries.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/EventsV1EventSeries.java index 0d845fb555..0045cff357 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/EventsV1EventSeries.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/EventsV1EventSeries.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * EventSeries contain information on series of events, i.e. thing that was/is happening continuously for some time. How often to update the EventSeries is up to the event reporters. The default event reporter in \"k8s.io/client-go/tools/events/event_broadcaster.go\" shows how this struct is updated on heartbeats and can guide customized reporter implementations. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class EventsV1EventSeries { public static final String SERIALIZED_NAME_COUNT = "count"; @SerializedName(SERIALIZED_NAME_COUNT) @@ -64,7 +64,6 @@ public EventsV1EventSeries() { } public EventsV1EventSeries count(Integer count) { - this.count = count; return this; } @@ -78,14 +77,12 @@ public Integer getCount() { return count; } - public void setCount(Integer count) { this.count = count; } public EventsV1EventSeries lastObservedTime(OffsetDateTime lastObservedTime) { - this.lastObservedTime = lastObservedTime; return this; } @@ -99,7 +96,6 @@ public OffsetDateTime getLastObservedTime() { return lastObservedTime; } - public void setLastObservedTime(OffsetDateTime lastObservedTime) { this.lastObservedTime = lastObservedTime; } @@ -162,32 +158,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to EventsV1EventSeries + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to EventsV1EventSeries */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!EventsV1EventSeries.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!EventsV1EventSeries.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in EventsV1EventSeries is not found in the empty JSON string", EventsV1EventSeries.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!EventsV1EventSeries.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `EventsV1EventSeries` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `EventsV1EventSeries` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : EventsV1EventSeries.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -210,9 +207,9 @@ public void write(JsonWriter out, EventsV1EventSeries value) throws IOException @Override public EventsV1EventSeries read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -239,3 +236,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/FlowcontrolV1Subject.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/FlowcontrolV1Subject.java index c1a621e230..409301624f 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/FlowcontrolV1Subject.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/FlowcontrolV1Subject.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1ServiceAccountSubject; import io.kubernetes.client.openapi.models.V1UserSubject; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * Subject matches the originator of a request, as identified by the request authentication system. There are three ways of matching an originator; by user, group, or service account. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class FlowcontrolV1Subject { public static final String SERIALIZED_NAME_GROUP = "group"; @SerializedName(SERIALIZED_NAME_GROUP) @@ -74,7 +74,6 @@ public FlowcontrolV1Subject() { } public FlowcontrolV1Subject group(V1GroupSubject group) { - this.group = group; return this; } @@ -88,14 +87,12 @@ public V1GroupSubject getGroup() { return group; } - public void setGroup(V1GroupSubject group) { this.group = group; } public FlowcontrolV1Subject kind(String kind) { - this.kind = kind; return this; } @@ -109,14 +106,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public FlowcontrolV1Subject serviceAccount(V1ServiceAccountSubject serviceAccount) { - this.serviceAccount = serviceAccount; return this; } @@ -130,14 +125,12 @@ public V1ServiceAccountSubject getServiceAccount() { return serviceAccount; } - public void setServiceAccount(V1ServiceAccountSubject serviceAccount) { this.serviceAccount = serviceAccount; } public FlowcontrolV1Subject user(V1UserSubject user) { - this.user = user; return this; } @@ -151,7 +144,6 @@ public V1UserSubject getUser() { return user; } - public void setUser(V1UserSubject user) { this.user = user; } @@ -219,46 +211,47 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to FlowcontrolV1Subject + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to FlowcontrolV1Subject */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!FlowcontrolV1Subject.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!FlowcontrolV1Subject.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in FlowcontrolV1Subject is not found in the empty JSON string", FlowcontrolV1Subject.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!FlowcontrolV1Subject.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `FlowcontrolV1Subject` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `FlowcontrolV1Subject` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : FlowcontrolV1Subject.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `group` if (jsonObj.get("group") != null && !jsonObj.get("group").isJsonNull()) { - V1GroupSubject.validateJsonObject(jsonObj.getAsJsonObject("group")); + V1GroupSubject.validateJsonElement(jsonObj.get("group")); } if (!jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); } // validate the optional field `serviceAccount` if (jsonObj.get("serviceAccount") != null && !jsonObj.get("serviceAccount").isJsonNull()) { - V1ServiceAccountSubject.validateJsonObject(jsonObj.getAsJsonObject("serviceAccount")); + V1ServiceAccountSubject.validateJsonElement(jsonObj.get("serviceAccount")); } // validate the optional field `user` if (jsonObj.get("user") != null && !jsonObj.get("user").isJsonNull()) { - V1UserSubject.validateJsonObject(jsonObj.getAsJsonObject("user")); + V1UserSubject.validateJsonElement(jsonObj.get("user")); } } @@ -282,9 +275,9 @@ public void write(JsonWriter out, FlowcontrolV1Subject value) throws IOException @Override public FlowcontrolV1Subject read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -311,3 +304,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/RbacV1Subject.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/RbacV1Subject.java index 320fb4feb9..ebc7366b55 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/RbacV1Subject.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/RbacV1Subject.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * 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. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class RbacV1Subject { public static final String SERIALIZED_NAME_API_GROUP = "apiGroup"; @SerializedName(SERIALIZED_NAME_API_GROUP) @@ -71,7 +71,6 @@ public RbacV1Subject() { } public RbacV1Subject apiGroup(String apiGroup) { - this.apiGroup = apiGroup; return this; } @@ -85,14 +84,12 @@ public String getApiGroup() { return apiGroup; } - public void setApiGroup(String apiGroup) { this.apiGroup = apiGroup; } public RbacV1Subject kind(String kind) { - this.kind = kind; return this; } @@ -106,14 +103,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public RbacV1Subject name(String name) { - this.name = name; return this; } @@ -127,14 +122,12 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } public RbacV1Subject namespace(String namespace) { - this.namespace = namespace; return this; } @@ -148,7 +141,6 @@ public String getNamespace() { return namespace; } - public void setNamespace(String namespace) { this.namespace = namespace; } @@ -217,32 +209,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to RbacV1Subject + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to RbacV1Subject */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!RbacV1Subject.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RbacV1Subject.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in RbacV1Subject is not found in the empty JSON string", RbacV1Subject.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!RbacV1Subject.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RbacV1Subject` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RbacV1Subject` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : RbacV1Subject.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiGroup") != null && !jsonObj.get("apiGroup").isJsonNull()) && !jsonObj.get("apiGroup").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiGroup` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiGroup").toString())); } @@ -277,9 +270,9 @@ public void write(JsonWriter out, RbacV1Subject value) throws IOException { @Override public RbacV1Subject read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -306,3 +299,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/StorageV1TokenRequest.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/StorageV1TokenRequest.java index 7ab80d3798..c519ff260c 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/StorageV1TokenRequest.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/StorageV1TokenRequest.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * TokenRequest contains parameters of a service account token. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class StorageV1TokenRequest { public static final String SERIALIZED_NAME_AUDIENCE = "audience"; @SerializedName(SERIALIZED_NAME_AUDIENCE) @@ -63,7 +63,6 @@ public StorageV1TokenRequest() { } public StorageV1TokenRequest audience(String audience) { - this.audience = audience; return this; } @@ -77,14 +76,12 @@ public String getAudience() { return audience; } - public void setAudience(String audience) { this.audience = audience; } public StorageV1TokenRequest expirationSeconds(Long expirationSeconds) { - this.expirationSeconds = expirationSeconds; return this; } @@ -98,7 +95,6 @@ public Long getExpirationSeconds() { return expirationSeconds; } - public void setExpirationSeconds(Long expirationSeconds) { this.expirationSeconds = expirationSeconds; } @@ -160,32 +156,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to StorageV1TokenRequest + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to StorageV1TokenRequest */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!StorageV1TokenRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!StorageV1TokenRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in StorageV1TokenRequest is not found in the empty JSON string", StorageV1TokenRequest.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!StorageV1TokenRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `StorageV1TokenRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `StorageV1TokenRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : StorageV1TokenRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("audience").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `audience` to be a primitive type in the JSON string but got `%s`", jsonObj.get("audience").toString())); } @@ -211,9 +208,9 @@ public void write(JsonWriter out, StorageV1TokenRequest value) throws IOExceptio @Override public StorageV1TokenRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -240,3 +237,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1APIGroup.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1APIGroup.java index 8ff09c3ec2..d3773ed329 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1APIGroup.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1APIGroup.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1ServerAddressByClientCIDR; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * APIGroup contains the name, the supported versions, and the preferred version of a group. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1APIGroup { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -73,7 +73,7 @@ public class V1APIGroup { public static final String SERIALIZED_NAME_SERVER_ADDRESS_BY_CLIENT_C_I_D_RS = "serverAddressByClientCIDRs"; @SerializedName(SERIALIZED_NAME_SERVER_ADDRESS_BY_CLIENT_C_I_D_RS) - private List serverAddressByClientCIDRs; + private List serverAddressByClientCIDRs = new ArrayList<>(); public static final String SERIALIZED_NAME_VERSIONS = "versions"; @SerializedName(SERIALIZED_NAME_VERSIONS) @@ -83,7 +83,6 @@ public V1APIGroup() { } public V1APIGroup apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -97,14 +96,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1APIGroup kind(String kind) { - this.kind = kind; return this; } @@ -118,14 +115,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1APIGroup name(String name) { - this.name = name; return this; } @@ -139,14 +134,12 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } public V1APIGroup preferredVersion(V1GroupVersionForDiscovery preferredVersion) { - this.preferredVersion = preferredVersion; return this; } @@ -160,14 +153,12 @@ public V1GroupVersionForDiscovery getPreferredVersion() { return preferredVersion; } - public void setPreferredVersion(V1GroupVersionForDiscovery preferredVersion) { this.preferredVersion = preferredVersion; } public V1APIGroup serverAddressByClientCIDRs(List serverAddressByClientCIDRs) { - this.serverAddressByClientCIDRs = serverAddressByClientCIDRs; return this; } @@ -189,14 +180,12 @@ public List getServerAddressByClientCIDRs() { return serverAddressByClientCIDRs; } - public void setServerAddressByClientCIDRs(List serverAddressByClientCIDRs) { this.serverAddressByClientCIDRs = serverAddressByClientCIDRs; } public V1APIGroup versions(List versions) { - this.versions = versions; return this; } @@ -218,7 +207,6 @@ public List getVersions() { return versions; } - public void setVersions(List versions) { this.versions = versions; } @@ -293,32 +281,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1APIGroup + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1APIGroup */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1APIGroup.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1APIGroup.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1APIGroup is not found in the empty JSON string", V1APIGroup.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1APIGroup.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1APIGroup` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1APIGroup` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1APIGroup.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -330,7 +319,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `preferredVersion` if (jsonObj.get("preferredVersion") != null && !jsonObj.get("preferredVersion").isJsonNull()) { - V1GroupVersionForDiscovery.validateJsonObject(jsonObj.getAsJsonObject("preferredVersion")); + V1GroupVersionForDiscovery.validateJsonElement(jsonObj.get("preferredVersion")); } if (jsonObj.get("serverAddressByClientCIDRs") != null && !jsonObj.get("serverAddressByClientCIDRs").isJsonNull()) { JsonArray jsonArrayserverAddressByClientCIDRs = jsonObj.getAsJsonArray("serverAddressByClientCIDRs"); @@ -342,7 +331,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `serverAddressByClientCIDRs` (array) for (int i = 0; i < jsonArrayserverAddressByClientCIDRs.size(); i++) { - V1ServerAddressByClientCIDR.validateJsonObject(jsonArrayserverAddressByClientCIDRs.get(i).getAsJsonObject()); + V1ServerAddressByClientCIDR.validateJsonElement(jsonArrayserverAddressByClientCIDRs.get(i)); }; } } @@ -354,7 +343,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArrayversions = jsonObj.getAsJsonArray("versions"); // validate the required field `versions` (array) for (int i = 0; i < jsonArrayversions.size(); i++) { - V1GroupVersionForDiscovery.validateJsonObject(jsonArrayversions.get(i).getAsJsonObject()); + V1GroupVersionForDiscovery.validateJsonElement(jsonArrayversions.get(i)); }; } @@ -378,9 +367,9 @@ public void write(JsonWriter out, V1APIGroup value) throws IOException { @Override public V1APIGroup read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -407,3 +396,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1APIGroupList.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1APIGroupList.java index 5726cdb235..04fedc47d2 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1APIGroupList.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1APIGroupList.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1APIGroup; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * APIGroupList is a list of APIGroup, to allow clients to discover the API at /apis. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1APIGroupList { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -70,7 +70,6 @@ public V1APIGroupList() { } public V1APIGroupList apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -84,14 +83,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1APIGroupList groups(List groups) { - this.groups = groups; return this; } @@ -113,14 +110,12 @@ public List getGroups() { return groups; } - public void setGroups(List groups) { this.groups = groups; } public V1APIGroupList kind(String kind) { - this.kind = kind; return this; } @@ -134,7 +129,6 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } @@ -199,32 +193,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1APIGroupList + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1APIGroupList */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1APIGroupList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1APIGroupList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1APIGroupList is not found in the empty JSON string", V1APIGroupList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1APIGroupList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1APIGroupList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1APIGroupList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1APIGroupList.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -236,7 +231,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArraygroups = jsonObj.getAsJsonArray("groups"); // validate the required field `groups` (array) for (int i = 0; i < jsonArraygroups.size(); i++) { - V1APIGroup.validateJsonObject(jsonArraygroups.get(i).getAsJsonObject()); + V1APIGroup.validateJsonElement(jsonArraygroups.get(i)); }; if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); @@ -263,9 +258,9 @@ public void write(JsonWriter out, V1APIGroupList value) throws IOException { @Override public V1APIGroupList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -292,3 +287,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1APIResource.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1APIResource.java index 5029b6bf7d..1c28424c2b 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1APIResource.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1APIResource.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -43,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -51,11 +51,11 @@ /** * APIResource specifies the name of a resource and whether it is namespaced. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1APIResource { public static final String SERIALIZED_NAME_CATEGORIES = "categories"; @SerializedName(SERIALIZED_NAME_CATEGORIES) - private List categories; + private List categories = new ArrayList<>(); public static final String SERIALIZED_NAME_GROUP = "group"; @SerializedName(SERIALIZED_NAME_GROUP) @@ -75,7 +75,7 @@ public class V1APIResource { public static final String SERIALIZED_NAME_SHORT_NAMES = "shortNames"; @SerializedName(SERIALIZED_NAME_SHORT_NAMES) - private List shortNames; + private List shortNames = new ArrayList<>(); public static final String SERIALIZED_NAME_SINGULAR_NAME = "singularName"; @SerializedName(SERIALIZED_NAME_SINGULAR_NAME) @@ -97,7 +97,6 @@ public V1APIResource() { } public V1APIResource categories(List categories) { - this.categories = categories; return this; } @@ -119,14 +118,12 @@ public List getCategories() { return categories; } - public void setCategories(List categories) { this.categories = categories; } public V1APIResource group(String group) { - this.group = group; return this; } @@ -140,14 +137,12 @@ public String getGroup() { return group; } - public void setGroup(String group) { this.group = group; } public V1APIResource kind(String kind) { - this.kind = kind; return this; } @@ -161,14 +156,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1APIResource name(String name) { - this.name = name; return this; } @@ -182,14 +175,12 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } public V1APIResource namespaced(Boolean namespaced) { - this.namespaced = namespaced; return this; } @@ -203,14 +194,12 @@ public Boolean getNamespaced() { return namespaced; } - public void setNamespaced(Boolean namespaced) { this.namespaced = namespaced; } public V1APIResource shortNames(List shortNames) { - this.shortNames = shortNames; return this; } @@ -232,14 +221,12 @@ public List getShortNames() { return shortNames; } - public void setShortNames(List shortNames) { this.shortNames = shortNames; } public V1APIResource singularName(String singularName) { - this.singularName = singularName; return this; } @@ -253,14 +240,12 @@ public String getSingularName() { return singularName; } - public void setSingularName(String singularName) { this.singularName = singularName; } public V1APIResource storageVersionHash(String storageVersionHash) { - this.storageVersionHash = storageVersionHash; return this; } @@ -274,14 +259,12 @@ public String getStorageVersionHash() { return storageVersionHash; } - public void setStorageVersionHash(String storageVersionHash) { this.storageVersionHash = storageVersionHash; } public V1APIResource verbs(List verbs) { - this.verbs = verbs; return this; } @@ -303,14 +286,12 @@ public List getVerbs() { return verbs; } - public void setVerbs(List verbs) { this.verbs = verbs; } public V1APIResource version(String version) { - this.version = version; return this; } @@ -324,7 +305,6 @@ public String getVersion() { return version; } - public void setVersion(String version) { this.version = version; } @@ -414,34 +394,35 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1APIResource + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1APIResource */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1APIResource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1APIResource.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1APIResource is not found in the empty JSON string", V1APIResource.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1APIResource.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1APIResource` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1APIResource` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1APIResource.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the optional json data is an array if present - if (jsonObj.get("categories") != null && !jsonObj.get("categories").isJsonArray()) { + if (jsonObj.get("categories") != null && !jsonObj.get("categories").isJsonNull() && !jsonObj.get("categories").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `categories` to be an array in the JSON string but got `%s`", jsonObj.get("categories").toString())); } if ((jsonObj.get("group") != null && !jsonObj.get("group").isJsonNull()) && !jsonObj.get("group").isJsonPrimitive()) { @@ -454,7 +435,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("shortNames") != null && !jsonObj.get("shortNames").isJsonArray()) { + if (jsonObj.get("shortNames") != null && !jsonObj.get("shortNames").isJsonNull() && !jsonObj.get("shortNames").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `shortNames` to be an array in the JSON string but got `%s`", jsonObj.get("shortNames").toString())); } if (!jsonObj.get("singularName").isJsonPrimitive()) { @@ -494,9 +475,9 @@ public void write(JsonWriter out, V1APIResource value) throws IOException { @Override public V1APIResource read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -523,3 +504,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1APIResourceList.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1APIResourceList.java index 67682dec71..3d4c613a65 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1APIResourceList.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1APIResourceList.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1APIResource; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * 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. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1APIResourceList { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -74,7 +74,6 @@ public V1APIResourceList() { } public V1APIResourceList apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -88,14 +87,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1APIResourceList groupVersion(String groupVersion) { - this.groupVersion = groupVersion; return this; } @@ -109,14 +106,12 @@ public String getGroupVersion() { return groupVersion; } - public void setGroupVersion(String groupVersion) { this.groupVersion = groupVersion; } public V1APIResourceList kind(String kind) { - this.kind = kind; return this; } @@ -130,14 +125,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1APIResourceList resources(List resources) { - this.resources = resources; return this; } @@ -159,7 +152,6 @@ public List getResources() { return resources; } - public void setResources(List resources) { this.resources = resources; } @@ -228,32 +220,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1APIResourceList + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1APIResourceList */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1APIResourceList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1APIResourceList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1APIResourceList is not found in the empty JSON string", V1APIResourceList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1APIResourceList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1APIResourceList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1APIResourceList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1APIResourceList.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -271,7 +264,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArrayresources = jsonObj.getAsJsonArray("resources"); // validate the required field `resources` (array) for (int i = 0; i < jsonArrayresources.size(); i++) { - V1APIResource.validateJsonObject(jsonArrayresources.get(i).getAsJsonObject()); + V1APIResource.validateJsonElement(jsonArrayresources.get(i)); }; } @@ -295,9 +288,9 @@ public void write(JsonWriter out, V1APIResourceList value) throws IOException { @Override public V1APIResourceList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -324,3 +317,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1APIService.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1APIService.java index 591be12f80..8447da9577 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1APIService.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1APIService.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1APIServiceStatus; import io.kubernetes.client.openapi.models.V1ObjectMeta; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * APIService represents a server for a particular GroupVersion. Name must be \"version.group\". */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1APIService implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -78,7 +78,6 @@ public V1APIService() { } public V1APIService apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -92,14 +91,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1APIService kind(String kind) { - this.kind = kind; return this; } @@ -113,14 +110,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1APIService metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -134,14 +129,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V1APIService spec(V1APIServiceSpec spec) { - this.spec = spec; return this; } @@ -155,14 +148,12 @@ public V1APIServiceSpec getSpec() { return spec; } - public void setSpec(V1APIServiceSpec spec) { this.spec = spec; } public V1APIService status(V1APIServiceStatus status) { - this.status = status; return this; } @@ -176,7 +167,6 @@ public V1APIServiceStatus getStatus() { return status; } - public void setStatus(V1APIServiceStatus status) { this.status = status; } @@ -246,25 +236,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1APIService + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1APIService */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1APIService.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1APIService.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1APIService is not found in the empty JSON string", V1APIService.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1APIService.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1APIService` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1APIService` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -273,15 +264,15 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } // validate the optional field `spec` if (jsonObj.get("spec") != null && !jsonObj.get("spec").isJsonNull()) { - V1APIServiceSpec.validateJsonObject(jsonObj.getAsJsonObject("spec")); + V1APIServiceSpec.validateJsonElement(jsonObj.get("spec")); } // validate the optional field `status` if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { - V1APIServiceStatus.validateJsonObject(jsonObj.getAsJsonObject("status")); + V1APIServiceStatus.validateJsonElement(jsonObj.get("status")); } } @@ -305,9 +296,9 @@ public void write(JsonWriter out, V1APIService value) throws IOException { @Override public V1APIService read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -334,3 +325,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1APIServiceCondition.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1APIServiceCondition.java index 9a617d08e7..09bdbebcca 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1APIServiceCondition.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1APIServiceCondition.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * APIServiceCondition describes the state of an APIService at a particular point */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1APIServiceCondition { public static final String SERIALIZED_NAME_LAST_TRANSITION_TIME = "lastTransitionTime"; @SerializedName(SERIALIZED_NAME_LAST_TRANSITION_TIME) @@ -76,7 +76,6 @@ public V1APIServiceCondition() { } public V1APIServiceCondition lastTransitionTime(OffsetDateTime lastTransitionTime) { - this.lastTransitionTime = lastTransitionTime; return this; } @@ -90,14 +89,12 @@ public OffsetDateTime getLastTransitionTime() { return lastTransitionTime; } - public void setLastTransitionTime(OffsetDateTime lastTransitionTime) { this.lastTransitionTime = lastTransitionTime; } public V1APIServiceCondition message(String message) { - this.message = message; return this; } @@ -111,14 +108,12 @@ public String getMessage() { return message; } - public void setMessage(String message) { this.message = message; } public V1APIServiceCondition reason(String reason) { - this.reason = reason; return this; } @@ -132,14 +127,12 @@ public String getReason() { return reason; } - public void setReason(String reason) { this.reason = reason; } public V1APIServiceCondition status(String status) { - this.status = status; return this; } @@ -153,14 +146,12 @@ public String getStatus() { return status; } - public void setStatus(String status) { this.status = status; } public V1APIServiceCondition type(String type) { - this.type = type; return this; } @@ -174,7 +165,6 @@ public String getType() { return type; } - public void setType(String type) { this.type = type; } @@ -246,32 +236,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1APIServiceCondition + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1APIServiceCondition */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1APIServiceCondition.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1APIServiceCondition.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1APIServiceCondition is not found in the empty JSON string", V1APIServiceCondition.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1APIServiceCondition.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1APIServiceCondition` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1APIServiceCondition` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1APIServiceCondition.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); } @@ -306,9 +297,9 @@ public void write(JsonWriter out, V1APIServiceCondition value) throws IOExceptio @Override public V1APIServiceCondition read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -335,3 +326,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1APIServiceList.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1APIServiceList.java index b686f7e3df..000ff30dfb 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1APIServiceList.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1APIServiceList.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1ListMeta; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * APIServiceList is a list of APIService objects. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1APIServiceList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -75,7 +75,6 @@ public V1APIServiceList() { } public V1APIServiceList apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -89,14 +88,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1APIServiceList items(List items) { - this.items = items; return this; } @@ -118,14 +115,12 @@ public List getItems() { return items; } - public void setItems(List items) { this.items = items; } public V1APIServiceList kind(String kind) { - this.kind = kind; return this; } @@ -139,14 +134,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1APIServiceList metadata(V1ListMeta metadata) { - this.metadata = metadata; return this; } @@ -160,7 +153,6 @@ public V1ListMeta getMetadata() { return metadata; } - public void setMetadata(V1ListMeta metadata) { this.metadata = metadata; } @@ -228,32 +220,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1APIServiceList + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1APIServiceList */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1APIServiceList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1APIServiceList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1APIServiceList is not found in the empty JSON string", V1APIServiceList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1APIServiceList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1APIServiceList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1APIServiceList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1APIServiceList.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -265,14 +258,14 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); // validate the required field `items` (array) for (int i = 0; i < jsonArrayitems.size(); i++) { - V1APIService.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject()); + V1APIService.validateJsonElement(jsonArrayitems.get(i)); }; if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ListMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ListMeta.validateJsonElement(jsonObj.get("metadata")); } } @@ -296,9 +289,9 @@ public void write(JsonWriter out, V1APIServiceList value) throws IOException { @Override public V1APIServiceList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -325,3 +318,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1APIServiceSpec.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1APIServiceSpec.java index a5aa260979..e08517e0cd 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1APIServiceSpec.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1APIServiceSpec.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.openapi.models.ApiregistrationV1ServiceReference; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * APIServiceSpec contains information for locating and communicating with a server. Only https is supported, though you are able to disable certificate verification. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1APIServiceSpec { public static final String SERIALIZED_NAME_CA_BUNDLE = "caBundle"; @SerializedName(SERIALIZED_NAME_CA_BUNDLE) @@ -84,7 +84,6 @@ public V1APIServiceSpec() { } public V1APIServiceSpec caBundle(byte[] caBundle) { - this.caBundle = caBundle; return this; } @@ -98,14 +97,12 @@ public byte[] getCaBundle() { return caBundle; } - public void setCaBundle(byte[] caBundle) { this.caBundle = caBundle; } public V1APIServiceSpec group(String group) { - this.group = group; return this; } @@ -119,14 +116,12 @@ public String getGroup() { return group; } - public void setGroup(String group) { this.group = group; } public V1APIServiceSpec groupPriorityMinimum(Integer groupPriorityMinimum) { - this.groupPriorityMinimum = groupPriorityMinimum; return this; } @@ -140,14 +135,12 @@ public Integer getGroupPriorityMinimum() { return groupPriorityMinimum; } - public void setGroupPriorityMinimum(Integer groupPriorityMinimum) { this.groupPriorityMinimum = groupPriorityMinimum; } public V1APIServiceSpec insecureSkipTLSVerify(Boolean insecureSkipTLSVerify) { - this.insecureSkipTLSVerify = insecureSkipTLSVerify; return this; } @@ -161,14 +154,12 @@ public Boolean getInsecureSkipTLSVerify() { return insecureSkipTLSVerify; } - public void setInsecureSkipTLSVerify(Boolean insecureSkipTLSVerify) { this.insecureSkipTLSVerify = insecureSkipTLSVerify; } public V1APIServiceSpec service(ApiregistrationV1ServiceReference service) { - this.service = service; return this; } @@ -182,14 +173,12 @@ public ApiregistrationV1ServiceReference getService() { return service; } - public void setService(ApiregistrationV1ServiceReference service) { this.service = service; } public V1APIServiceSpec version(String version) { - this.version = version; return this; } @@ -203,14 +192,12 @@ public String getVersion() { return version; } - public void setVersion(String version) { this.version = version; } public V1APIServiceSpec versionPriority(Integer versionPriority) { - this.versionPriority = versionPriority; return this; } @@ -224,7 +211,6 @@ public Integer getVersionPriority() { return versionPriority; } - public void setVersionPriority(Integer versionPriority) { this.versionPriority = versionPriority; } @@ -302,38 +288,39 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1APIServiceSpec + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1APIServiceSpec */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1APIServiceSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1APIServiceSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1APIServiceSpec is not found in the empty JSON string", V1APIServiceSpec.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1APIServiceSpec.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1APIServiceSpec` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1APIServiceSpec` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1APIServiceSpec.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("group") != null && !jsonObj.get("group").isJsonNull()) && !jsonObj.get("group").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `group` to be a primitive type in the JSON string but got `%s`", jsonObj.get("group").toString())); } // validate the optional field `service` if (jsonObj.get("service") != null && !jsonObj.get("service").isJsonNull()) { - ApiregistrationV1ServiceReference.validateJsonObject(jsonObj.getAsJsonObject("service")); + ApiregistrationV1ServiceReference.validateJsonElement(jsonObj.get("service")); } if ((jsonObj.get("version") != null && !jsonObj.get("version").isJsonNull()) && !jsonObj.get("version").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `version` to be a primitive type in the JSON string but got `%s`", jsonObj.get("version").toString())); @@ -360,9 +347,9 @@ public void write(JsonWriter out, V1APIServiceSpec value) throws IOException { @Override public V1APIServiceSpec read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -389,3 +376,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1APIServiceStatus.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1APIServiceStatus.java index bdd28277b4..6caeb7ca36 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1APIServiceStatus.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1APIServiceStatus.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1APIServiceCondition; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,17 +52,16 @@ /** * APIServiceStatus contains derived information about an API server */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1APIServiceStatus { public static final String SERIALIZED_NAME_CONDITIONS = "conditions"; @SerializedName(SERIALIZED_NAME_CONDITIONS) - private List conditions; + private List conditions = new ArrayList<>(); public V1APIServiceStatus() { } public V1APIServiceStatus conditions(List conditions) { - this.conditions = conditions; return this; } @@ -84,7 +83,6 @@ public List getConditions() { return conditions; } - public void setConditions(List conditions) { this.conditions = conditions; } @@ -142,25 +140,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1APIServiceStatus + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1APIServiceStatus */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1APIServiceStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1APIServiceStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1APIServiceStatus is not found in the empty JSON string", V1APIServiceStatus.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1APIServiceStatus.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1APIServiceStatus` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1APIServiceStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (jsonObj.get("conditions") != null && !jsonObj.get("conditions").isJsonNull()) { JsonArray jsonArrayconditions = jsonObj.getAsJsonArray("conditions"); if (jsonArrayconditions != null) { @@ -171,7 +170,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `conditions` (array) for (int i = 0; i < jsonArrayconditions.size(); i++) { - V1APIServiceCondition.validateJsonObject(jsonArrayconditions.get(i).getAsJsonObject()); + V1APIServiceCondition.validateJsonElement(jsonArrayconditions.get(i)); }; } } @@ -197,9 +196,9 @@ public void write(JsonWriter out, V1APIServiceStatus value) throws IOException { @Override public V1APIServiceStatus read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -226,3 +225,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1APIVersions.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1APIVersions.java index 5a2943fe92..0edfec86ea 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1APIVersions.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1APIVersions.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1ServerAddressByClientCIDR; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * 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. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1APIVersions { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -74,7 +74,6 @@ public V1APIVersions() { } public V1APIVersions apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -88,14 +87,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1APIVersions kind(String kind) { - this.kind = kind; return this; } @@ -109,14 +106,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1APIVersions serverAddressByClientCIDRs(List serverAddressByClientCIDRs) { - this.serverAddressByClientCIDRs = serverAddressByClientCIDRs; return this; } @@ -138,14 +133,12 @@ public List getServerAddressByClientCIDRs() { return serverAddressByClientCIDRs; } - public void setServerAddressByClientCIDRs(List serverAddressByClientCIDRs) { this.serverAddressByClientCIDRs = serverAddressByClientCIDRs; } public V1APIVersions versions(List versions) { - this.versions = versions; return this; } @@ -167,7 +160,6 @@ public List getVersions() { return versions; } - public void setVersions(List versions) { this.versions = versions; } @@ -236,32 +228,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1APIVersions + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1APIVersions */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1APIVersions.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1APIVersions.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1APIVersions is not found in the empty JSON string", V1APIVersions.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1APIVersions.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1APIVersions` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1APIVersions` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1APIVersions.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -276,7 +269,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArrayserverAddressByClientCIDRs = jsonObj.getAsJsonArray("serverAddressByClientCIDRs"); // validate the required field `serverAddressByClientCIDRs` (array) for (int i = 0; i < jsonArrayserverAddressByClientCIDRs.size(); i++) { - V1ServerAddressByClientCIDR.validateJsonObject(jsonArrayserverAddressByClientCIDRs.get(i).getAsJsonObject()); + V1ServerAddressByClientCIDR.validateJsonElement(jsonArrayserverAddressByClientCIDRs.get(i)); }; // ensure the required json array is present if (jsonObj.get("versions") == null) { @@ -306,9 +299,9 @@ public void write(JsonWriter out, V1APIVersions value) throws IOException { @Override public V1APIVersions read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -335,3 +328,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1AWSElasticBlockStoreVolumeSource.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1AWSElasticBlockStoreVolumeSource.java index 64d098d0e2..cdcec4429a 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1AWSElasticBlockStoreVolumeSource.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1AWSElasticBlockStoreVolumeSource.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * 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. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1AWSElasticBlockStoreVolumeSource { public static final String SERIALIZED_NAME_FS_TYPE = "fsType"; @SerializedName(SERIALIZED_NAME_FS_TYPE) @@ -71,7 +71,6 @@ public V1AWSElasticBlockStoreVolumeSource() { } public V1AWSElasticBlockStoreVolumeSource fsType(String fsType) { - this.fsType = fsType; return this; } @@ -85,14 +84,12 @@ public String getFsType() { return fsType; } - public void setFsType(String fsType) { this.fsType = fsType; } public V1AWSElasticBlockStoreVolumeSource partition(Integer partition) { - this.partition = partition; return this; } @@ -106,14 +103,12 @@ public Integer getPartition() { return partition; } - public void setPartition(Integer partition) { this.partition = partition; } public V1AWSElasticBlockStoreVolumeSource readOnly(Boolean readOnly) { - this.readOnly = readOnly; return this; } @@ -127,14 +122,12 @@ public Boolean getReadOnly() { return readOnly; } - public void setReadOnly(Boolean readOnly) { this.readOnly = readOnly; } public V1AWSElasticBlockStoreVolumeSource volumeID(String volumeID) { - this.volumeID = volumeID; return this; } @@ -148,7 +141,6 @@ public String getVolumeID() { return volumeID; } - public void setVolumeID(String volumeID) { this.volumeID = volumeID; } @@ -216,32 +208,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1AWSElasticBlockStoreVolumeSource + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1AWSElasticBlockStoreVolumeSource */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1AWSElasticBlockStoreVolumeSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1AWSElasticBlockStoreVolumeSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1AWSElasticBlockStoreVolumeSource is not found in the empty JSON string", V1AWSElasticBlockStoreVolumeSource.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1AWSElasticBlockStoreVolumeSource.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1AWSElasticBlockStoreVolumeSource` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1AWSElasticBlockStoreVolumeSource` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1AWSElasticBlockStoreVolumeSource.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("fsType") != null && !jsonObj.get("fsType").isJsonNull()) && !jsonObj.get("fsType").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `fsType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fsType").toString())); } @@ -270,9 +263,9 @@ public void write(JsonWriter out, V1AWSElasticBlockStoreVolumeSource value) thro @Override public V1AWSElasticBlockStoreVolumeSource read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -299,3 +292,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Affinity.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Affinity.java index 86e3fb02c9..afc5eef0b2 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Affinity.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Affinity.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1PodAffinity; import io.kubernetes.client.openapi.models.V1PodAntiAffinity; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * Affinity is a group of affinity scheduling rules. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1Affinity { public static final String SERIALIZED_NAME_NODE_AFFINITY = "nodeAffinity"; @SerializedName(SERIALIZED_NAME_NODE_AFFINITY) @@ -70,7 +70,6 @@ public V1Affinity() { } public V1Affinity nodeAffinity(V1NodeAffinity nodeAffinity) { - this.nodeAffinity = nodeAffinity; return this; } @@ -84,14 +83,12 @@ public V1NodeAffinity getNodeAffinity() { return nodeAffinity; } - public void setNodeAffinity(V1NodeAffinity nodeAffinity) { this.nodeAffinity = nodeAffinity; } public V1Affinity podAffinity(V1PodAffinity podAffinity) { - this.podAffinity = podAffinity; return this; } @@ -105,14 +102,12 @@ public V1PodAffinity getPodAffinity() { return podAffinity; } - public void setPodAffinity(V1PodAffinity podAffinity) { this.podAffinity = podAffinity; } public V1Affinity podAntiAffinity(V1PodAntiAffinity podAntiAffinity) { - this.podAntiAffinity = podAntiAffinity; return this; } @@ -126,7 +121,6 @@ public V1PodAntiAffinity getPodAntiAffinity() { return podAntiAffinity; } - public void setPodAntiAffinity(V1PodAntiAffinity podAntiAffinity) { this.podAntiAffinity = podAntiAffinity; } @@ -190,36 +184,37 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1Affinity + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1Affinity */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1Affinity.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1Affinity.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1Affinity is not found in the empty JSON string", V1Affinity.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1Affinity.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1Affinity` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1Affinity` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `nodeAffinity` if (jsonObj.get("nodeAffinity") != null && !jsonObj.get("nodeAffinity").isJsonNull()) { - V1NodeAffinity.validateJsonObject(jsonObj.getAsJsonObject("nodeAffinity")); + V1NodeAffinity.validateJsonElement(jsonObj.get("nodeAffinity")); } // validate the optional field `podAffinity` if (jsonObj.get("podAffinity") != null && !jsonObj.get("podAffinity").isJsonNull()) { - V1PodAffinity.validateJsonObject(jsonObj.getAsJsonObject("podAffinity")); + V1PodAffinity.validateJsonElement(jsonObj.get("podAffinity")); } // validate the optional field `podAntiAffinity` if (jsonObj.get("podAntiAffinity") != null && !jsonObj.get("podAntiAffinity").isJsonNull()) { - V1PodAntiAffinity.validateJsonObject(jsonObj.getAsJsonObject("podAntiAffinity")); + V1PodAntiAffinity.validateJsonElement(jsonObj.get("podAntiAffinity")); } } @@ -243,9 +238,9 @@ public void write(JsonWriter out, V1Affinity value) throws IOException { @Override public V1Affinity read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -272,3 +267,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1AggregationRule.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1AggregationRule.java index b5bb6956db..1856cd234e 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1AggregationRule.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1AggregationRule.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1LabelSelector; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,17 +52,16 @@ /** * AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1AggregationRule { public static final String SERIALIZED_NAME_CLUSTER_ROLE_SELECTORS = "clusterRoleSelectors"; @SerializedName(SERIALIZED_NAME_CLUSTER_ROLE_SELECTORS) - private List clusterRoleSelectors; + private List clusterRoleSelectors = new ArrayList<>(); public V1AggregationRule() { } public V1AggregationRule clusterRoleSelectors(List clusterRoleSelectors) { - this.clusterRoleSelectors = clusterRoleSelectors; return this; } @@ -84,7 +83,6 @@ public List getClusterRoleSelectors() { return clusterRoleSelectors; } - public void setClusterRoleSelectors(List clusterRoleSelectors) { this.clusterRoleSelectors = clusterRoleSelectors; } @@ -142,25 +140,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1AggregationRule + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1AggregationRule */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1AggregationRule.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1AggregationRule.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1AggregationRule is not found in the empty JSON string", V1AggregationRule.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1AggregationRule.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1AggregationRule` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1AggregationRule` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (jsonObj.get("clusterRoleSelectors") != null && !jsonObj.get("clusterRoleSelectors").isJsonNull()) { JsonArray jsonArrayclusterRoleSelectors = jsonObj.getAsJsonArray("clusterRoleSelectors"); if (jsonArrayclusterRoleSelectors != null) { @@ -171,7 +170,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `clusterRoleSelectors` (array) for (int i = 0; i < jsonArrayclusterRoleSelectors.size(); i++) { - V1LabelSelector.validateJsonObject(jsonArrayclusterRoleSelectors.get(i).getAsJsonObject()); + V1LabelSelector.validateJsonElement(jsonArrayclusterRoleSelectors.get(i)); }; } } @@ -197,9 +196,9 @@ public void write(JsonWriter out, V1AggregationRule value) throws IOException { @Override public V1AggregationRule read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -226,3 +225,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1AppArmorProfile.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1AppArmorProfile.java index 30a29bf9c9..f3682133f5 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1AppArmorProfile.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1AppArmorProfile.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * AppArmorProfile defines a pod or container's AppArmor settings. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1AppArmorProfile { public static final String SERIALIZED_NAME_LOCALHOST_PROFILE = "localhostProfile"; @SerializedName(SERIALIZED_NAME_LOCALHOST_PROFILE) @@ -63,7 +63,6 @@ public V1AppArmorProfile() { } public V1AppArmorProfile localhostProfile(String localhostProfile) { - this.localhostProfile = localhostProfile; return this; } @@ -77,14 +76,12 @@ public String getLocalhostProfile() { return localhostProfile; } - public void setLocalhostProfile(String localhostProfile) { this.localhostProfile = localhostProfile; } public V1AppArmorProfile type(String type) { - this.type = type; return this; } @@ -98,7 +95,6 @@ public String getType() { return type; } - public void setType(String type) { this.type = type; } @@ -160,32 +156,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1AppArmorProfile + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1AppArmorProfile */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1AppArmorProfile.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1AppArmorProfile.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1AppArmorProfile is not found in the empty JSON string", V1AppArmorProfile.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1AppArmorProfile.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1AppArmorProfile` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1AppArmorProfile` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1AppArmorProfile.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("localhostProfile") != null && !jsonObj.get("localhostProfile").isJsonNull()) && !jsonObj.get("localhostProfile").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `localhostProfile` to be a primitive type in the JSON string but got `%s`", jsonObj.get("localhostProfile").toString())); } @@ -214,9 +211,9 @@ public void write(JsonWriter out, V1AppArmorProfile value) throws IOException { @Override public V1AppArmorProfile read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -243,3 +240,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1AttachedVolume.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1AttachedVolume.java index 882b1a6c15..9fc654c7dc 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1AttachedVolume.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1AttachedVolume.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * AttachedVolume describes a volume attached to a node */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1AttachedVolume { public static final String SERIALIZED_NAME_DEVICE_PATH = "devicePath"; @SerializedName(SERIALIZED_NAME_DEVICE_PATH) @@ -63,7 +63,6 @@ public V1AttachedVolume() { } public V1AttachedVolume devicePath(String devicePath) { - this.devicePath = devicePath; return this; } @@ -77,14 +76,12 @@ public String getDevicePath() { return devicePath; } - public void setDevicePath(String devicePath) { this.devicePath = devicePath; } public V1AttachedVolume name(String name) { - this.name = name; return this; } @@ -98,7 +95,6 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } @@ -161,32 +157,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1AttachedVolume + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1AttachedVolume */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1AttachedVolume.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1AttachedVolume.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1AttachedVolume is not found in the empty JSON string", V1AttachedVolume.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1AttachedVolume.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1AttachedVolume` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1AttachedVolume` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1AttachedVolume.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("devicePath").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `devicePath` to be a primitive type in the JSON string but got `%s`", jsonObj.get("devicePath").toString())); } @@ -215,9 +212,9 @@ public void write(JsonWriter out, V1AttachedVolume value) throws IOException { @Override public V1AttachedVolume read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -244,3 +241,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1AuditAnnotation.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1AuditAnnotation.java index 94990fddfb..79828b10d9 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1AuditAnnotation.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1AuditAnnotation.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * AuditAnnotation describes how to produce an audit annotation for an API request. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1AuditAnnotation { public static final String SERIALIZED_NAME_KEY = "key"; @SerializedName(SERIALIZED_NAME_KEY) @@ -63,7 +63,6 @@ public V1AuditAnnotation() { } public V1AuditAnnotation key(String key) { - this.key = key; return this; } @@ -77,14 +76,12 @@ public String getKey() { return key; } - public void setKey(String key) { this.key = key; } public V1AuditAnnotation valueExpression(String valueExpression) { - this.valueExpression = valueExpression; return this; } @@ -98,7 +95,6 @@ public String getValueExpression() { return valueExpression; } - public void setValueExpression(String valueExpression) { this.valueExpression = valueExpression; } @@ -161,32 +157,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1AuditAnnotation + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1AuditAnnotation */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1AuditAnnotation.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1AuditAnnotation.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1AuditAnnotation is not found in the empty JSON string", V1AuditAnnotation.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1AuditAnnotation.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1AuditAnnotation` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1AuditAnnotation` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1AuditAnnotation.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("key").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `key` to be a primitive type in the JSON string but got `%s`", jsonObj.get("key").toString())); } @@ -215,9 +212,9 @@ public void write(JsonWriter out, V1AuditAnnotation value) throws IOException { @Override public V1AuditAnnotation read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -244,3 +241,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1AzureDiskVolumeSource.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1AzureDiskVolumeSource.java index 20eaeea246..75f397ed87 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1AzureDiskVolumeSource.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1AzureDiskVolumeSource.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1AzureDiskVolumeSource { public static final String SERIALIZED_NAME_CACHING_MODE = "cachingMode"; @SerializedName(SERIALIZED_NAME_CACHING_MODE) @@ -79,7 +79,6 @@ public V1AzureDiskVolumeSource() { } public V1AzureDiskVolumeSource cachingMode(String cachingMode) { - this.cachingMode = cachingMode; return this; } @@ -93,14 +92,12 @@ public String getCachingMode() { return cachingMode; } - public void setCachingMode(String cachingMode) { this.cachingMode = cachingMode; } public V1AzureDiskVolumeSource diskName(String diskName) { - this.diskName = diskName; return this; } @@ -114,14 +111,12 @@ public String getDiskName() { return diskName; } - public void setDiskName(String diskName) { this.diskName = diskName; } public V1AzureDiskVolumeSource diskURI(String diskURI) { - this.diskURI = diskURI; return this; } @@ -135,14 +130,12 @@ public String getDiskURI() { return diskURI; } - public void setDiskURI(String diskURI) { this.diskURI = diskURI; } public V1AzureDiskVolumeSource fsType(String fsType) { - this.fsType = fsType; return this; } @@ -156,14 +149,12 @@ public String getFsType() { return fsType; } - public void setFsType(String fsType) { this.fsType = fsType; } public V1AzureDiskVolumeSource kind(String kind) { - this.kind = kind; return this; } @@ -177,14 +168,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1AzureDiskVolumeSource readOnly(Boolean readOnly) { - this.readOnly = readOnly; return this; } @@ -198,7 +187,6 @@ public Boolean getReadOnly() { return readOnly; } - public void setReadOnly(Boolean readOnly) { this.readOnly = readOnly; } @@ -273,32 +261,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1AzureDiskVolumeSource + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1AzureDiskVolumeSource */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1AzureDiskVolumeSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1AzureDiskVolumeSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1AzureDiskVolumeSource is not found in the empty JSON string", V1AzureDiskVolumeSource.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1AzureDiskVolumeSource.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1AzureDiskVolumeSource` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1AzureDiskVolumeSource` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1AzureDiskVolumeSource.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("cachingMode") != null && !jsonObj.get("cachingMode").isJsonNull()) && !jsonObj.get("cachingMode").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `cachingMode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cachingMode").toString())); } @@ -336,9 +325,9 @@ public void write(JsonWriter out, V1AzureDiskVolumeSource value) throws IOExcept @Override public V1AzureDiskVolumeSource read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -365,3 +354,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1AzureFilePersistentVolumeSource.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1AzureFilePersistentVolumeSource.java index 9f4f9ee928..c44fb253ad 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1AzureFilePersistentVolumeSource.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1AzureFilePersistentVolumeSource.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * AzureFile represents an Azure File Service mount on the host and bind mount to the pod. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1AzureFilePersistentVolumeSource { public static final String SERIALIZED_NAME_READ_ONLY = "readOnly"; @SerializedName(SERIALIZED_NAME_READ_ONLY) @@ -71,7 +71,6 @@ public V1AzureFilePersistentVolumeSource() { } public V1AzureFilePersistentVolumeSource readOnly(Boolean readOnly) { - this.readOnly = readOnly; return this; } @@ -85,14 +84,12 @@ public Boolean getReadOnly() { return readOnly; } - public void setReadOnly(Boolean readOnly) { this.readOnly = readOnly; } public V1AzureFilePersistentVolumeSource secretName(String secretName) { - this.secretName = secretName; return this; } @@ -106,14 +103,12 @@ public String getSecretName() { return secretName; } - public void setSecretName(String secretName) { this.secretName = secretName; } public V1AzureFilePersistentVolumeSource secretNamespace(String secretNamespace) { - this.secretNamespace = secretNamespace; return this; } @@ -127,14 +122,12 @@ public String getSecretNamespace() { return secretNamespace; } - public void setSecretNamespace(String secretNamespace) { this.secretNamespace = secretNamespace; } public V1AzureFilePersistentVolumeSource shareName(String shareName) { - this.shareName = shareName; return this; } @@ -148,7 +141,6 @@ public String getShareName() { return shareName; } - public void setShareName(String shareName) { this.shareName = shareName; } @@ -217,32 +209,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1AzureFilePersistentVolumeSource + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1AzureFilePersistentVolumeSource */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1AzureFilePersistentVolumeSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1AzureFilePersistentVolumeSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1AzureFilePersistentVolumeSource is not found in the empty JSON string", V1AzureFilePersistentVolumeSource.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1AzureFilePersistentVolumeSource.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1AzureFilePersistentVolumeSource` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1AzureFilePersistentVolumeSource` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1AzureFilePersistentVolumeSource.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("secretName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `secretName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("secretName").toString())); } @@ -274,9 +267,9 @@ public void write(JsonWriter out, V1AzureFilePersistentVolumeSource value) throw @Override public V1AzureFilePersistentVolumeSource read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -303,3 +296,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1AzureFileVolumeSource.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1AzureFileVolumeSource.java index f4e33a0955..6a54743d8b 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1AzureFileVolumeSource.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1AzureFileVolumeSource.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * AzureFile represents an Azure File Service mount on the host and bind mount to the pod. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1AzureFileVolumeSource { public static final String SERIALIZED_NAME_READ_ONLY = "readOnly"; @SerializedName(SERIALIZED_NAME_READ_ONLY) @@ -67,7 +67,6 @@ public V1AzureFileVolumeSource() { } public V1AzureFileVolumeSource readOnly(Boolean readOnly) { - this.readOnly = readOnly; return this; } @@ -81,14 +80,12 @@ public Boolean getReadOnly() { return readOnly; } - public void setReadOnly(Boolean readOnly) { this.readOnly = readOnly; } public V1AzureFileVolumeSource secretName(String secretName) { - this.secretName = secretName; return this; } @@ -102,14 +99,12 @@ public String getSecretName() { return secretName; } - public void setSecretName(String secretName) { this.secretName = secretName; } public V1AzureFileVolumeSource shareName(String shareName) { - this.shareName = shareName; return this; } @@ -123,7 +118,6 @@ public String getShareName() { return shareName; } - public void setShareName(String shareName) { this.shareName = shareName; } @@ -189,32 +183,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1AzureFileVolumeSource + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1AzureFileVolumeSource */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1AzureFileVolumeSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1AzureFileVolumeSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1AzureFileVolumeSource is not found in the empty JSON string", V1AzureFileVolumeSource.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1AzureFileVolumeSource.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1AzureFileVolumeSource` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1AzureFileVolumeSource` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1AzureFileVolumeSource.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("secretName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `secretName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("secretName").toString())); } @@ -243,9 +238,9 @@ public void write(JsonWriter out, V1AzureFileVolumeSource value) throws IOExcept @Override public V1AzureFileVolumeSource read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -272,3 +267,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Binding.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Binding.java index 1e204199b6..c39df24d34 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Binding.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Binding.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1ObjectMeta; import io.kubernetes.client.openapi.models.V1ObjectReference; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -43,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -51,7 +51,7 @@ /** * Binding ties one object to another; for example, a pod is bound to a node by a scheduler. Deprecated in 1.7, please use the bindings subresource of pods instead. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1Binding implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -73,7 +73,6 @@ public V1Binding() { } public V1Binding apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -87,14 +86,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1Binding kind(String kind) { - this.kind = kind; return this; } @@ -108,14 +105,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1Binding metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -129,14 +124,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V1Binding target(V1ObjectReference target) { - this.target = target; return this; } @@ -150,7 +143,6 @@ public V1ObjectReference getTarget() { return target; } - public void setTarget(V1ObjectReference target) { this.target = target; } @@ -218,32 +210,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1Binding + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1Binding */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1Binding.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1Binding.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1Binding is not found in the empty JSON string", V1Binding.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1Binding.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1Binding` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1Binding` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1Binding.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -252,10 +245,10 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } // validate the required field `target` - V1ObjectReference.validateJsonObject(jsonObj.getAsJsonObject("target")); + V1ObjectReference.validateJsonElement(jsonObj.get("target")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -278,9 +271,9 @@ public void write(JsonWriter out, V1Binding value) throws IOException { @Override public V1Binding read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -307,3 +300,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1BoundObjectReference.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1BoundObjectReference.java index 63a9609ae5..aa47b78c1e 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1BoundObjectReference.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1BoundObjectReference.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * BoundObjectReference is a reference to an object that a token is bound to. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1BoundObjectReference { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -71,7 +71,6 @@ public V1BoundObjectReference() { } public V1BoundObjectReference apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -85,14 +84,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1BoundObjectReference kind(String kind) { - this.kind = kind; return this; } @@ -106,14 +103,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1BoundObjectReference name(String name) { - this.name = name; return this; } @@ -127,14 +122,12 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } public V1BoundObjectReference uid(String uid) { - this.uid = uid; return this; } @@ -148,7 +141,6 @@ public String getUid() { return uid; } - public void setUid(String uid) { this.uid = uid; } @@ -215,25 +207,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1BoundObjectReference + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1BoundObjectReference */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1BoundObjectReference.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1BoundObjectReference.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1BoundObjectReference is not found in the empty JSON string", V1BoundObjectReference.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1BoundObjectReference.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1BoundObjectReference` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1BoundObjectReference` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -268,9 +261,9 @@ public void write(JsonWriter out, V1BoundObjectReference value) throws IOExcepti @Override public V1BoundObjectReference read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -297,3 +290,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CSIDriver.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CSIDriver.java index a3badbcc81..640e631408 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CSIDriver.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CSIDriver.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1CSIDriverSpec; import io.kubernetes.client.openapi.models.V1ObjectMeta; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -43,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -51,7 +51,7 @@ /** * CSIDriver captures information about a Container Storage Interface (CSI) volume driver deployed on the cluster. Kubernetes attach detach controller uses this object to determine whether attach is required. Kubelet uses this object to determine whether pod information needs to be passed on mount. CSIDriver objects are non-namespaced. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1CSIDriver implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -73,7 +73,6 @@ public V1CSIDriver() { } public V1CSIDriver apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -87,14 +86,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1CSIDriver kind(String kind) { - this.kind = kind; return this; } @@ -108,14 +105,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1CSIDriver metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -129,14 +124,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V1CSIDriver spec(V1CSIDriverSpec spec) { - this.spec = spec; return this; } @@ -150,7 +143,6 @@ public V1CSIDriverSpec getSpec() { return spec; } - public void setSpec(V1CSIDriverSpec spec) { this.spec = spec; } @@ -218,32 +210,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1CSIDriver + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1CSIDriver */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1CSIDriver.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1CSIDriver.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1CSIDriver is not found in the empty JSON string", V1CSIDriver.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1CSIDriver.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1CSIDriver` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1CSIDriver` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1CSIDriver.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -252,10 +245,10 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } // validate the required field `spec` - V1CSIDriverSpec.validateJsonObject(jsonObj.getAsJsonObject("spec")); + V1CSIDriverSpec.validateJsonElement(jsonObj.get("spec")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -278,9 +271,9 @@ public void write(JsonWriter out, V1CSIDriver value) throws IOException { @Override public V1CSIDriver read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -307,3 +300,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CSIDriverList.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CSIDriverList.java index 030c1e3112..fae0cc6fa1 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CSIDriverList.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CSIDriverList.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1ListMeta; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * CSIDriverList is a collection of CSIDriver objects. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1CSIDriverList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -75,7 +75,6 @@ public V1CSIDriverList() { } public V1CSIDriverList apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -89,14 +88,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1CSIDriverList items(List items) { - this.items = items; return this; } @@ -118,14 +115,12 @@ public List getItems() { return items; } - public void setItems(List items) { this.items = items; } public V1CSIDriverList kind(String kind) { - this.kind = kind; return this; } @@ -139,14 +134,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1CSIDriverList metadata(V1ListMeta metadata) { - this.metadata = metadata; return this; } @@ -160,7 +153,6 @@ public V1ListMeta getMetadata() { return metadata; } - public void setMetadata(V1ListMeta metadata) { this.metadata = metadata; } @@ -228,32 +220,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1CSIDriverList + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1CSIDriverList */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1CSIDriverList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1CSIDriverList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1CSIDriverList is not found in the empty JSON string", V1CSIDriverList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1CSIDriverList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1CSIDriverList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1CSIDriverList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1CSIDriverList.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -265,14 +258,14 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); // validate the required field `items` (array) for (int i = 0; i < jsonArrayitems.size(); i++) { - V1CSIDriver.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject()); + V1CSIDriver.validateJsonElement(jsonArrayitems.get(i)); }; if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ListMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ListMeta.validateJsonElement(jsonObj.get("metadata")); } } @@ -296,9 +289,9 @@ public void write(JsonWriter out, V1CSIDriverList value) throws IOException { @Override public V1CSIDriverList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -325,3 +318,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CSIDriverSpec.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CSIDriverSpec.java index 3ec090cc73..6716fb145b 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CSIDriverSpec.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CSIDriverSpec.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.StorageV1TokenRequest; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * CSIDriverSpec is the specification of a CSIDriver. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1CSIDriverSpec { public static final String SERIALIZED_NAME_ATTACH_REQUIRED = "attachRequired"; @SerializedName(SERIALIZED_NAME_ATTACH_REQUIRED) @@ -80,17 +80,16 @@ public class V1CSIDriverSpec { public static final String SERIALIZED_NAME_TOKEN_REQUESTS = "tokenRequests"; @SerializedName(SERIALIZED_NAME_TOKEN_REQUESTS) - private List tokenRequests; + private List tokenRequests = new ArrayList<>(); public static final String SERIALIZED_NAME_VOLUME_LIFECYCLE_MODES = "volumeLifecycleModes"; @SerializedName(SERIALIZED_NAME_VOLUME_LIFECYCLE_MODES) - private List volumeLifecycleModes; + private List volumeLifecycleModes = new ArrayList<>(); public V1CSIDriverSpec() { } public V1CSIDriverSpec attachRequired(Boolean attachRequired) { - this.attachRequired = attachRequired; return this; } @@ -104,14 +103,12 @@ public Boolean getAttachRequired() { return attachRequired; } - public void setAttachRequired(Boolean attachRequired) { this.attachRequired = attachRequired; } public V1CSIDriverSpec fsGroupPolicy(String fsGroupPolicy) { - this.fsGroupPolicy = fsGroupPolicy; return this; } @@ -125,14 +122,12 @@ public String getFsGroupPolicy() { return fsGroupPolicy; } - public void setFsGroupPolicy(String fsGroupPolicy) { this.fsGroupPolicy = fsGroupPolicy; } public V1CSIDriverSpec podInfoOnMount(Boolean podInfoOnMount) { - this.podInfoOnMount = podInfoOnMount; return this; } @@ -146,14 +141,12 @@ public Boolean getPodInfoOnMount() { return podInfoOnMount; } - public void setPodInfoOnMount(Boolean podInfoOnMount) { this.podInfoOnMount = podInfoOnMount; } public V1CSIDriverSpec requiresRepublish(Boolean requiresRepublish) { - this.requiresRepublish = requiresRepublish; return this; } @@ -167,14 +160,12 @@ public Boolean getRequiresRepublish() { return requiresRepublish; } - public void setRequiresRepublish(Boolean requiresRepublish) { this.requiresRepublish = requiresRepublish; } public V1CSIDriverSpec seLinuxMount(Boolean seLinuxMount) { - this.seLinuxMount = seLinuxMount; return this; } @@ -188,14 +179,12 @@ public Boolean getSeLinuxMount() { return seLinuxMount; } - public void setSeLinuxMount(Boolean seLinuxMount) { this.seLinuxMount = seLinuxMount; } public V1CSIDriverSpec storageCapacity(Boolean storageCapacity) { - this.storageCapacity = storageCapacity; return this; } @@ -209,14 +198,12 @@ public Boolean getStorageCapacity() { return storageCapacity; } - public void setStorageCapacity(Boolean storageCapacity) { this.storageCapacity = storageCapacity; } public V1CSIDriverSpec tokenRequests(List tokenRequests) { - this.tokenRequests = tokenRequests; return this; } @@ -238,14 +225,12 @@ public List getTokenRequests() { return tokenRequests; } - public void setTokenRequests(List tokenRequests) { this.tokenRequests = tokenRequests; } public V1CSIDriverSpec volumeLifecycleModes(List volumeLifecycleModes) { - this.volumeLifecycleModes = volumeLifecycleModes; return this; } @@ -267,7 +252,6 @@ public List getVolumeLifecycleModes() { return volumeLifecycleModes; } - public void setVolumeLifecycleModes(List volumeLifecycleModes) { this.volumeLifecycleModes = volumeLifecycleModes; } @@ -346,25 +330,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1CSIDriverSpec + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1CSIDriverSpec */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1CSIDriverSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1CSIDriverSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1CSIDriverSpec is not found in the empty JSON string", V1CSIDriverSpec.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1CSIDriverSpec.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1CSIDriverSpec` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1CSIDriverSpec` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("fsGroupPolicy") != null && !jsonObj.get("fsGroupPolicy").isJsonNull()) && !jsonObj.get("fsGroupPolicy").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `fsGroupPolicy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fsGroupPolicy").toString())); } @@ -378,12 +363,12 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `tokenRequests` (array) for (int i = 0; i < jsonArraytokenRequests.size(); i++) { - StorageV1TokenRequest.validateJsonObject(jsonArraytokenRequests.get(i).getAsJsonObject()); + StorageV1TokenRequest.validateJsonElement(jsonArraytokenRequests.get(i)); }; } } // ensure the optional json data is an array if present - if (jsonObj.get("volumeLifecycleModes") != null && !jsonObj.get("volumeLifecycleModes").isJsonArray()) { + if (jsonObj.get("volumeLifecycleModes") != null && !jsonObj.get("volumeLifecycleModes").isJsonNull() && !jsonObj.get("volumeLifecycleModes").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `volumeLifecycleModes` to be an array in the JSON string but got `%s`", jsonObj.get("volumeLifecycleModes").toString())); } } @@ -408,9 +393,9 @@ public void write(JsonWriter out, V1CSIDriverSpec value) throws IOException { @Override public V1CSIDriverSpec read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -437,3 +422,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CSINode.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CSINode.java index fff635ce41..0d4744aa89 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CSINode.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CSINode.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1CSINodeSpec; import io.kubernetes.client.openapi.models.V1ObjectMeta; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -43,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -51,7 +51,7 @@ /** * CSINode holds information about all CSI drivers installed on a node. CSI drivers do not need to create the CSINode object directly. As long as they use the node-driver-registrar sidecar container, the kubelet will automatically populate the CSINode object for the CSI driver as part of kubelet plugin registration. CSINode has the same name as a node. If the object is missing, it means either there are no CSI Drivers available on the node, or the Kubelet version is low enough that it doesn't create this object. CSINode has an OwnerReference that points to the corresponding node object. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1CSINode implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -73,7 +73,6 @@ public V1CSINode() { } public V1CSINode apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -87,14 +86,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1CSINode kind(String kind) { - this.kind = kind; return this; } @@ -108,14 +105,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1CSINode metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -129,14 +124,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V1CSINode spec(V1CSINodeSpec spec) { - this.spec = spec; return this; } @@ -150,7 +143,6 @@ public V1CSINodeSpec getSpec() { return spec; } - public void setSpec(V1CSINodeSpec spec) { this.spec = spec; } @@ -218,32 +210,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1CSINode + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1CSINode */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1CSINode.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1CSINode.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1CSINode is not found in the empty JSON string", V1CSINode.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1CSINode.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1CSINode` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1CSINode` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1CSINode.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -252,10 +245,10 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } // validate the required field `spec` - V1CSINodeSpec.validateJsonObject(jsonObj.getAsJsonObject("spec")); + V1CSINodeSpec.validateJsonElement(jsonObj.get("spec")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -278,9 +271,9 @@ public void write(JsonWriter out, V1CSINode value) throws IOException { @Override public V1CSINode read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -307,3 +300,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CSINodeDriver.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CSINodeDriver.java index fe4dd1a57f..e4189876f3 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CSINodeDriver.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CSINodeDriver.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1VolumeNodeResources; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * CSINodeDriver holds information about the specification of one CSI driver installed on a node */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1CSINodeDriver { public static final String SERIALIZED_NAME_ALLOCATABLE = "allocatable"; @SerializedName(SERIALIZED_NAME_ALLOCATABLE) @@ -68,13 +68,12 @@ public class V1CSINodeDriver { public static final String SERIALIZED_NAME_TOPOLOGY_KEYS = "topologyKeys"; @SerializedName(SERIALIZED_NAME_TOPOLOGY_KEYS) - private List topologyKeys; + private List topologyKeys = new ArrayList<>(); public V1CSINodeDriver() { } public V1CSINodeDriver allocatable(V1VolumeNodeResources allocatable) { - this.allocatable = allocatable; return this; } @@ -88,14 +87,12 @@ public V1VolumeNodeResources getAllocatable() { return allocatable; } - public void setAllocatable(V1VolumeNodeResources allocatable) { this.allocatable = allocatable; } public V1CSINodeDriver name(String name) { - this.name = name; return this; } @@ -109,14 +106,12 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } public V1CSINodeDriver nodeID(String nodeID) { - this.nodeID = nodeID; return this; } @@ -130,14 +125,12 @@ public String getNodeID() { return nodeID; } - public void setNodeID(String nodeID) { this.nodeID = nodeID; } public V1CSINodeDriver topologyKeys(List topologyKeys) { - this.topologyKeys = topologyKeys; return this; } @@ -159,7 +152,6 @@ public List getTopologyKeys() { return topologyKeys; } - public void setTopologyKeys(List topologyKeys) { this.topologyKeys = topologyKeys; } @@ -228,35 +220,36 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1CSINodeDriver + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1CSINodeDriver */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1CSINodeDriver.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1CSINodeDriver.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1CSINodeDriver is not found in the empty JSON string", V1CSINodeDriver.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1CSINodeDriver.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1CSINodeDriver` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1CSINodeDriver` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1CSINodeDriver.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `allocatable` if (jsonObj.get("allocatable") != null && !jsonObj.get("allocatable").isJsonNull()) { - V1VolumeNodeResources.validateJsonObject(jsonObj.getAsJsonObject("allocatable")); + V1VolumeNodeResources.validateJsonElement(jsonObj.get("allocatable")); } if (!jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); @@ -265,7 +258,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("Expected the field `nodeID` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nodeID").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("topologyKeys") != null && !jsonObj.get("topologyKeys").isJsonArray()) { + if (jsonObj.get("topologyKeys") != null && !jsonObj.get("topologyKeys").isJsonNull() && !jsonObj.get("topologyKeys").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `topologyKeys` to be an array in the JSON string but got `%s`", jsonObj.get("topologyKeys").toString())); } } @@ -290,9 +283,9 @@ public void write(JsonWriter out, V1CSINodeDriver value) throws IOException { @Override public V1CSINodeDriver read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -319,3 +312,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CSINodeList.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CSINodeList.java index 58a58771ba..992badecb1 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CSINodeList.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CSINodeList.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1ListMeta; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * CSINodeList is a collection of CSINode objects. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1CSINodeList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -75,7 +75,6 @@ public V1CSINodeList() { } public V1CSINodeList apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -89,14 +88,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1CSINodeList items(List items) { - this.items = items; return this; } @@ -118,14 +115,12 @@ public List getItems() { return items; } - public void setItems(List items) { this.items = items; } public V1CSINodeList kind(String kind) { - this.kind = kind; return this; } @@ -139,14 +134,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1CSINodeList metadata(V1ListMeta metadata) { - this.metadata = metadata; return this; } @@ -160,7 +153,6 @@ public V1ListMeta getMetadata() { return metadata; } - public void setMetadata(V1ListMeta metadata) { this.metadata = metadata; } @@ -228,32 +220,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1CSINodeList + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1CSINodeList */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1CSINodeList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1CSINodeList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1CSINodeList is not found in the empty JSON string", V1CSINodeList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1CSINodeList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1CSINodeList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1CSINodeList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1CSINodeList.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -265,14 +258,14 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); // validate the required field `items` (array) for (int i = 0; i < jsonArrayitems.size(); i++) { - V1CSINode.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject()); + V1CSINode.validateJsonElement(jsonArrayitems.get(i)); }; if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ListMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ListMeta.validateJsonElement(jsonObj.get("metadata")); } } @@ -296,9 +289,9 @@ public void write(JsonWriter out, V1CSINodeList value) throws IOException { @Override public V1CSINodeList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -325,3 +318,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CSINodeSpec.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CSINodeSpec.java index 081eb250b9..4f8d86afcd 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CSINodeSpec.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CSINodeSpec.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1CSINodeDriver; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * CSINodeSpec holds information about the specification of all CSI drivers installed on a node */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1CSINodeSpec { public static final String SERIALIZED_NAME_DRIVERS = "drivers"; @SerializedName(SERIALIZED_NAME_DRIVERS) @@ -62,7 +62,6 @@ public V1CSINodeSpec() { } public V1CSINodeSpec drivers(List drivers) { - this.drivers = drivers; return this; } @@ -84,7 +83,6 @@ public List getDrivers() { return drivers; } - public void setDrivers(List drivers) { this.drivers = drivers; } @@ -143,32 +141,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1CSINodeSpec + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1CSINodeSpec */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1CSINodeSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1CSINodeSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1CSINodeSpec is not found in the empty JSON string", V1CSINodeSpec.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1CSINodeSpec.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1CSINodeSpec` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1CSINodeSpec` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1CSINodeSpec.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the json data is an array if (!jsonObj.get("drivers").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `drivers` to be an array in the JSON string but got `%s`", jsonObj.get("drivers").toString())); @@ -177,7 +176,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArraydrivers = jsonObj.getAsJsonArray("drivers"); // validate the required field `drivers` (array) for (int i = 0; i < jsonArraydrivers.size(); i++) { - V1CSINodeDriver.validateJsonObject(jsonArraydrivers.get(i).getAsJsonObject()); + V1CSINodeDriver.validateJsonElement(jsonArraydrivers.get(i)); }; } @@ -201,9 +200,9 @@ public void write(JsonWriter out, V1CSINodeSpec value) throws IOException { @Override public V1CSINodeSpec read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -230,3 +229,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CSIPersistentVolumeSource.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CSIPersistentVolumeSource.java index 62540fd814..396022fca1 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CSIPersistentVolumeSource.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CSIPersistentVolumeSource.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.openapi.models.V1SecretReference; import java.io.IOException; +import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * Represents storage that is managed by an external CSI volume driver (Beta feature) */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1CSIPersistentVolumeSource { public static final String SERIALIZED_NAME_CONTROLLER_EXPAND_SECRET_REF = "controllerExpandSecretRef"; @SerializedName(SERIALIZED_NAME_CONTROLLER_EXPAND_SECRET_REF) @@ -98,7 +98,6 @@ public V1CSIPersistentVolumeSource() { } public V1CSIPersistentVolumeSource controllerExpandSecretRef(V1SecretReference controllerExpandSecretRef) { - this.controllerExpandSecretRef = controllerExpandSecretRef; return this; } @@ -112,14 +111,12 @@ public V1SecretReference getControllerExpandSecretRef() { return controllerExpandSecretRef; } - public void setControllerExpandSecretRef(V1SecretReference controllerExpandSecretRef) { this.controllerExpandSecretRef = controllerExpandSecretRef; } public V1CSIPersistentVolumeSource controllerPublishSecretRef(V1SecretReference controllerPublishSecretRef) { - this.controllerPublishSecretRef = controllerPublishSecretRef; return this; } @@ -133,14 +130,12 @@ public V1SecretReference getControllerPublishSecretRef() { return controllerPublishSecretRef; } - public void setControllerPublishSecretRef(V1SecretReference controllerPublishSecretRef) { this.controllerPublishSecretRef = controllerPublishSecretRef; } public V1CSIPersistentVolumeSource driver(String driver) { - this.driver = driver; return this; } @@ -154,14 +149,12 @@ public String getDriver() { return driver; } - public void setDriver(String driver) { this.driver = driver; } public V1CSIPersistentVolumeSource fsType(String fsType) { - this.fsType = fsType; return this; } @@ -175,14 +168,12 @@ public String getFsType() { return fsType; } - public void setFsType(String fsType) { this.fsType = fsType; } public V1CSIPersistentVolumeSource nodeExpandSecretRef(V1SecretReference nodeExpandSecretRef) { - this.nodeExpandSecretRef = nodeExpandSecretRef; return this; } @@ -196,14 +187,12 @@ public V1SecretReference getNodeExpandSecretRef() { return nodeExpandSecretRef; } - public void setNodeExpandSecretRef(V1SecretReference nodeExpandSecretRef) { this.nodeExpandSecretRef = nodeExpandSecretRef; } public V1CSIPersistentVolumeSource nodePublishSecretRef(V1SecretReference nodePublishSecretRef) { - this.nodePublishSecretRef = nodePublishSecretRef; return this; } @@ -217,14 +206,12 @@ public V1SecretReference getNodePublishSecretRef() { return nodePublishSecretRef; } - public void setNodePublishSecretRef(V1SecretReference nodePublishSecretRef) { this.nodePublishSecretRef = nodePublishSecretRef; } public V1CSIPersistentVolumeSource nodeStageSecretRef(V1SecretReference nodeStageSecretRef) { - this.nodeStageSecretRef = nodeStageSecretRef; return this; } @@ -238,14 +225,12 @@ public V1SecretReference getNodeStageSecretRef() { return nodeStageSecretRef; } - public void setNodeStageSecretRef(V1SecretReference nodeStageSecretRef) { this.nodeStageSecretRef = nodeStageSecretRef; } public V1CSIPersistentVolumeSource readOnly(Boolean readOnly) { - this.readOnly = readOnly; return this; } @@ -259,14 +244,12 @@ public Boolean getReadOnly() { return readOnly; } - public void setReadOnly(Boolean readOnly) { this.readOnly = readOnly; } public V1CSIPersistentVolumeSource volumeAttributes(Map volumeAttributes) { - this.volumeAttributes = volumeAttributes; return this; } @@ -288,14 +271,12 @@ public Map getVolumeAttributes() { return volumeAttributes; } - public void setVolumeAttributes(Map volumeAttributes) { this.volumeAttributes = volumeAttributes; } public V1CSIPersistentVolumeSource volumeHandle(String volumeHandle) { - this.volumeHandle = volumeHandle; return this; } @@ -309,7 +290,6 @@ public String getVolumeHandle() { return volumeHandle; } - public void setVolumeHandle(String volumeHandle) { this.volumeHandle = volumeHandle; } @@ -396,39 +376,40 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1CSIPersistentVolumeSource + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1CSIPersistentVolumeSource */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1CSIPersistentVolumeSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1CSIPersistentVolumeSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1CSIPersistentVolumeSource is not found in the empty JSON string", V1CSIPersistentVolumeSource.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1CSIPersistentVolumeSource.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1CSIPersistentVolumeSource` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1CSIPersistentVolumeSource` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1CSIPersistentVolumeSource.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `controllerExpandSecretRef` if (jsonObj.get("controllerExpandSecretRef") != null && !jsonObj.get("controllerExpandSecretRef").isJsonNull()) { - V1SecretReference.validateJsonObject(jsonObj.getAsJsonObject("controllerExpandSecretRef")); + V1SecretReference.validateJsonElement(jsonObj.get("controllerExpandSecretRef")); } // validate the optional field `controllerPublishSecretRef` if (jsonObj.get("controllerPublishSecretRef") != null && !jsonObj.get("controllerPublishSecretRef").isJsonNull()) { - V1SecretReference.validateJsonObject(jsonObj.getAsJsonObject("controllerPublishSecretRef")); + V1SecretReference.validateJsonElement(jsonObj.get("controllerPublishSecretRef")); } if (!jsonObj.get("driver").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `driver` to be a primitive type in the JSON string but got `%s`", jsonObj.get("driver").toString())); @@ -438,15 +419,15 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `nodeExpandSecretRef` if (jsonObj.get("nodeExpandSecretRef") != null && !jsonObj.get("nodeExpandSecretRef").isJsonNull()) { - V1SecretReference.validateJsonObject(jsonObj.getAsJsonObject("nodeExpandSecretRef")); + V1SecretReference.validateJsonElement(jsonObj.get("nodeExpandSecretRef")); } // validate the optional field `nodePublishSecretRef` if (jsonObj.get("nodePublishSecretRef") != null && !jsonObj.get("nodePublishSecretRef").isJsonNull()) { - V1SecretReference.validateJsonObject(jsonObj.getAsJsonObject("nodePublishSecretRef")); + V1SecretReference.validateJsonElement(jsonObj.get("nodePublishSecretRef")); } // validate the optional field `nodeStageSecretRef` if (jsonObj.get("nodeStageSecretRef") != null && !jsonObj.get("nodeStageSecretRef").isJsonNull()) { - V1SecretReference.validateJsonObject(jsonObj.getAsJsonObject("nodeStageSecretRef")); + V1SecretReference.validateJsonElement(jsonObj.get("nodeStageSecretRef")); } if (!jsonObj.get("volumeHandle").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `volumeHandle` to be a primitive type in the JSON string but got `%s`", jsonObj.get("volumeHandle").toString())); @@ -473,9 +454,9 @@ public void write(JsonWriter out, V1CSIPersistentVolumeSource value) throws IOEx @Override public V1CSIPersistentVolumeSource read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -502,3 +483,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CSIStorageCapacity.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CSIStorageCapacity.java index 56797a8c43..47279cf57c 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CSIStorageCapacity.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CSIStorageCapacity.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1LabelSelector; import io.kubernetes.client.openapi.models.V1ObjectMeta; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * CSIStorageCapacity stores the result of one CSI GetCapacity call. For a given StorageClass, this describes the available capacity in a particular topology segment. This can be used when considering where to instantiate new PersistentVolumes. For example this can express things like: - StorageClass \"standard\" has \"1234 GiB\" available in \"topology.kubernetes.io/zone=us-east1\" - StorageClass \"localssd\" has \"10 GiB\" available in \"kubernetes.io/hostname=knode-abc123\" The following three cases all imply that no capacity is available for a certain combination: - no object exists with suitable topology and storage class name - such an object exists, but the capacity is unset - such an object exists, but the capacity is zero The producer of these objects can decide which approach is more suitable. They are consumed by the kube-scheduler when a CSI driver opts into capacity-aware scheduling with CSIDriverSpec.StorageCapacity. The scheduler compares the MaximumVolumeSize against the requested size of pending volumes to filter out unsuitable nodes. If MaximumVolumeSize is unset, it falls back to a comparison against the less precise Capacity. If that is also unset, the scheduler assumes that capacity is insufficient and tries some other node. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1CSIStorageCapacity implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -86,7 +86,6 @@ public V1CSIStorageCapacity() { } public V1CSIStorageCapacity apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -100,14 +99,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1CSIStorageCapacity capacity(Quantity capacity) { - this.capacity = capacity; return this; } @@ -121,14 +118,12 @@ public Quantity getCapacity() { return capacity; } - public void setCapacity(Quantity capacity) { this.capacity = capacity; } public V1CSIStorageCapacity kind(String kind) { - this.kind = kind; return this; } @@ -142,14 +137,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1CSIStorageCapacity maximumVolumeSize(Quantity maximumVolumeSize) { - this.maximumVolumeSize = maximumVolumeSize; return this; } @@ -163,14 +156,12 @@ public Quantity getMaximumVolumeSize() { return maximumVolumeSize; } - public void setMaximumVolumeSize(Quantity maximumVolumeSize) { this.maximumVolumeSize = maximumVolumeSize; } public V1CSIStorageCapacity metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -184,14 +175,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V1CSIStorageCapacity nodeTopology(V1LabelSelector nodeTopology) { - this.nodeTopology = nodeTopology; return this; } @@ -205,14 +194,12 @@ public V1LabelSelector getNodeTopology() { return nodeTopology; } - public void setNodeTopology(V1LabelSelector nodeTopology) { this.nodeTopology = nodeTopology; } public V1CSIStorageCapacity storageClassName(String storageClassName) { - this.storageClassName = storageClassName; return this; } @@ -226,7 +213,6 @@ public String getStorageClassName() { return storageClassName; } - public void setStorageClassName(String storageClassName) { this.storageClassName = storageClassName; } @@ -303,32 +289,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1CSIStorageCapacity + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1CSIStorageCapacity */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1CSIStorageCapacity.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1CSIStorageCapacity.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1CSIStorageCapacity is not found in the empty JSON string", V1CSIStorageCapacity.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1CSIStorageCapacity.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1CSIStorageCapacity` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1CSIStorageCapacity` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1CSIStorageCapacity.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -343,11 +330,11 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } // validate the optional field `nodeTopology` if (jsonObj.get("nodeTopology") != null && !jsonObj.get("nodeTopology").isJsonNull()) { - V1LabelSelector.validateJsonObject(jsonObj.getAsJsonObject("nodeTopology")); + V1LabelSelector.validateJsonElement(jsonObj.get("nodeTopology")); } if (!jsonObj.get("storageClassName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `storageClassName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("storageClassName").toString())); @@ -374,9 +361,9 @@ public void write(JsonWriter out, V1CSIStorageCapacity value) throws IOException @Override public V1CSIStorageCapacity read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -403,3 +390,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CSIStorageCapacityList.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CSIStorageCapacityList.java index 276361e9e1..cf23fc7ae7 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CSIStorageCapacityList.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CSIStorageCapacityList.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1ListMeta; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * CSIStorageCapacityList is a collection of CSIStorageCapacity objects. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1CSIStorageCapacityList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -75,7 +75,6 @@ public V1CSIStorageCapacityList() { } public V1CSIStorageCapacityList apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -89,14 +88,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1CSIStorageCapacityList items(List items) { - this.items = items; return this; } @@ -118,14 +115,12 @@ public List getItems() { return items; } - public void setItems(List items) { this.items = items; } public V1CSIStorageCapacityList kind(String kind) { - this.kind = kind; return this; } @@ -139,14 +134,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1CSIStorageCapacityList metadata(V1ListMeta metadata) { - this.metadata = metadata; return this; } @@ -160,7 +153,6 @@ public V1ListMeta getMetadata() { return metadata; } - public void setMetadata(V1ListMeta metadata) { this.metadata = metadata; } @@ -228,32 +220,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1CSIStorageCapacityList + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1CSIStorageCapacityList */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1CSIStorageCapacityList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1CSIStorageCapacityList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1CSIStorageCapacityList is not found in the empty JSON string", V1CSIStorageCapacityList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1CSIStorageCapacityList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1CSIStorageCapacityList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1CSIStorageCapacityList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1CSIStorageCapacityList.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -265,14 +258,14 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); // validate the required field `items` (array) for (int i = 0; i < jsonArrayitems.size(); i++) { - V1CSIStorageCapacity.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject()); + V1CSIStorageCapacity.validateJsonElement(jsonArrayitems.get(i)); }; if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ListMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ListMeta.validateJsonElement(jsonObj.get("metadata")); } } @@ -296,9 +289,9 @@ public void write(JsonWriter out, V1CSIStorageCapacityList value) throws IOExcep @Override public V1CSIStorageCapacityList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -325,3 +318,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CSIVolumeSource.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CSIVolumeSource.java index 6b31cb355e..2c7fa27137 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CSIVolumeSource.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CSIVolumeSource.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.openapi.models.V1LocalObjectReference; import java.io.IOException; +import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * Represents a source location of a volume to mount, managed by an external CSI driver */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1CSIVolumeSource { public static final String SERIALIZED_NAME_DRIVER = "driver"; @SerializedName(SERIALIZED_NAME_DRIVER) @@ -78,7 +78,6 @@ public V1CSIVolumeSource() { } public V1CSIVolumeSource driver(String driver) { - this.driver = driver; return this; } @@ -92,14 +91,12 @@ public String getDriver() { return driver; } - public void setDriver(String driver) { this.driver = driver; } public V1CSIVolumeSource fsType(String fsType) { - this.fsType = fsType; return this; } @@ -113,14 +110,12 @@ public String getFsType() { return fsType; } - public void setFsType(String fsType) { this.fsType = fsType; } public V1CSIVolumeSource nodePublishSecretRef(V1LocalObjectReference nodePublishSecretRef) { - this.nodePublishSecretRef = nodePublishSecretRef; return this; } @@ -134,14 +129,12 @@ public V1LocalObjectReference getNodePublishSecretRef() { return nodePublishSecretRef; } - public void setNodePublishSecretRef(V1LocalObjectReference nodePublishSecretRef) { this.nodePublishSecretRef = nodePublishSecretRef; } public V1CSIVolumeSource readOnly(Boolean readOnly) { - this.readOnly = readOnly; return this; } @@ -155,14 +148,12 @@ public Boolean getReadOnly() { return readOnly; } - public void setReadOnly(Boolean readOnly) { this.readOnly = readOnly; } public V1CSIVolumeSource volumeAttributes(Map volumeAttributes) { - this.volumeAttributes = volumeAttributes; return this; } @@ -184,7 +175,6 @@ public Map getVolumeAttributes() { return volumeAttributes; } - public void setVolumeAttributes(Map volumeAttributes) { this.volumeAttributes = volumeAttributes; } @@ -255,32 +245,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1CSIVolumeSource + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1CSIVolumeSource */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1CSIVolumeSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1CSIVolumeSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1CSIVolumeSource is not found in the empty JSON string", V1CSIVolumeSource.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1CSIVolumeSource.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1CSIVolumeSource` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1CSIVolumeSource` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1CSIVolumeSource.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("driver").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `driver` to be a primitive type in the JSON string but got `%s`", jsonObj.get("driver").toString())); } @@ -289,7 +280,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `nodePublishSecretRef` if (jsonObj.get("nodePublishSecretRef") != null && !jsonObj.get("nodePublishSecretRef").isJsonNull()) { - V1LocalObjectReference.validateJsonObject(jsonObj.getAsJsonObject("nodePublishSecretRef")); + V1LocalObjectReference.validateJsonElement(jsonObj.get("nodePublishSecretRef")); } } @@ -313,9 +304,9 @@ public void write(JsonWriter out, V1CSIVolumeSource value) throws IOException { @Override public V1CSIVolumeSource read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -342,3 +333,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Capabilities.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Capabilities.java index c043a200f5..ee94891e62 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Capabilities.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Capabilities.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -43,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -51,21 +51,20 @@ /** * Adds and removes POSIX capabilities from running containers. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1Capabilities { public static final String SERIALIZED_NAME_ADD = "add"; @SerializedName(SERIALIZED_NAME_ADD) - private List add; + private List add = new ArrayList<>(); public static final String SERIALIZED_NAME_DROP = "drop"; @SerializedName(SERIALIZED_NAME_DROP) - private List drop; + private List drop = new ArrayList<>(); public V1Capabilities() { } public V1Capabilities add(List add) { - this.add = add; return this; } @@ -87,14 +86,12 @@ public List getAdd() { return add; } - public void setAdd(List add) { this.add = add; } public V1Capabilities drop(List drop) { - this.drop = drop; return this; } @@ -116,7 +113,6 @@ public List getDrop() { return drop; } - public void setDrop(List drop) { this.drop = drop; } @@ -177,31 +173,32 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1Capabilities + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1Capabilities */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1Capabilities.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1Capabilities.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1Capabilities is not found in the empty JSON string", V1Capabilities.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1Capabilities.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1Capabilities` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1Capabilities` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the optional json data is an array if present - if (jsonObj.get("add") != null && !jsonObj.get("add").isJsonArray()) { + if (jsonObj.get("add") != null && !jsonObj.get("add").isJsonNull() && !jsonObj.get("add").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `add` to be an array in the JSON string but got `%s`", jsonObj.get("add").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("drop") != null && !jsonObj.get("drop").isJsonArray()) { + if (jsonObj.get("drop") != null && !jsonObj.get("drop").isJsonNull() && !jsonObj.get("drop").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `drop` to be an array in the JSON string but got `%s`", jsonObj.get("drop").toString())); } } @@ -226,9 +223,9 @@ public void write(JsonWriter out, V1Capabilities value) throws IOException { @Override public V1Capabilities read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -255,3 +252,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CephFSPersistentVolumeSource.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CephFSPersistentVolumeSource.java index b074060499..ec9e159283 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CephFSPersistentVolumeSource.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CephFSPersistentVolumeSource.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1SecretReference; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * Represents a Ceph Filesystem mount that lasts the lifetime of a pod Cephfs volumes do not support ownership management or SELinux relabeling. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1CephFSPersistentVolumeSource { public static final String SERIALIZED_NAME_MONITORS = "monitors"; @SerializedName(SERIALIZED_NAME_MONITORS) @@ -82,7 +82,6 @@ public V1CephFSPersistentVolumeSource() { } public V1CephFSPersistentVolumeSource monitors(List monitors) { - this.monitors = monitors; return this; } @@ -104,14 +103,12 @@ public List getMonitors() { return monitors; } - public void setMonitors(List monitors) { this.monitors = monitors; } public V1CephFSPersistentVolumeSource path(String path) { - this.path = path; return this; } @@ -125,14 +122,12 @@ public String getPath() { return path; } - public void setPath(String path) { this.path = path; } public V1CephFSPersistentVolumeSource readOnly(Boolean readOnly) { - this.readOnly = readOnly; return this; } @@ -146,14 +141,12 @@ public Boolean getReadOnly() { return readOnly; } - public void setReadOnly(Boolean readOnly) { this.readOnly = readOnly; } public V1CephFSPersistentVolumeSource secretFile(String secretFile) { - this.secretFile = secretFile; return this; } @@ -167,14 +160,12 @@ public String getSecretFile() { return secretFile; } - public void setSecretFile(String secretFile) { this.secretFile = secretFile; } public V1CephFSPersistentVolumeSource secretRef(V1SecretReference secretRef) { - this.secretRef = secretRef; return this; } @@ -188,14 +179,12 @@ public V1SecretReference getSecretRef() { return secretRef; } - public void setSecretRef(V1SecretReference secretRef) { this.secretRef = secretRef; } public V1CephFSPersistentVolumeSource user(String user) { - this.user = user; return this; } @@ -209,7 +198,6 @@ public String getUser() { return user; } - public void setUser(String user) { this.user = user; } @@ -283,32 +271,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1CephFSPersistentVolumeSource + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1CephFSPersistentVolumeSource */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1CephFSPersistentVolumeSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1CephFSPersistentVolumeSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1CephFSPersistentVolumeSource is not found in the empty JSON string", V1CephFSPersistentVolumeSource.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1CephFSPersistentVolumeSource.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1CephFSPersistentVolumeSource` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1CephFSPersistentVolumeSource` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1CephFSPersistentVolumeSource.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the required json array is present if (jsonObj.get("monitors") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); @@ -323,7 +312,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `secretRef` if (jsonObj.get("secretRef") != null && !jsonObj.get("secretRef").isJsonNull()) { - V1SecretReference.validateJsonObject(jsonObj.getAsJsonObject("secretRef")); + V1SecretReference.validateJsonElement(jsonObj.get("secretRef")); } if ((jsonObj.get("user") != null && !jsonObj.get("user").isJsonNull()) && !jsonObj.get("user").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `user` to be a primitive type in the JSON string but got `%s`", jsonObj.get("user").toString())); @@ -350,9 +339,9 @@ public void write(JsonWriter out, V1CephFSPersistentVolumeSource value) throws I @Override public V1CephFSPersistentVolumeSource read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -379,3 +368,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CephFSVolumeSource.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CephFSVolumeSource.java index 40abf78af5..ef62985090 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CephFSVolumeSource.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CephFSVolumeSource.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1LocalObjectReference; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * Represents a Ceph Filesystem mount that lasts the lifetime of a pod Cephfs volumes do not support ownership management or SELinux relabeling. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1CephFSVolumeSource { public static final String SERIALIZED_NAME_MONITORS = "monitors"; @SerializedName(SERIALIZED_NAME_MONITORS) @@ -82,7 +82,6 @@ public V1CephFSVolumeSource() { } public V1CephFSVolumeSource monitors(List monitors) { - this.monitors = monitors; return this; } @@ -104,14 +103,12 @@ public List getMonitors() { return monitors; } - public void setMonitors(List monitors) { this.monitors = monitors; } public V1CephFSVolumeSource path(String path) { - this.path = path; return this; } @@ -125,14 +122,12 @@ public String getPath() { return path; } - public void setPath(String path) { this.path = path; } public V1CephFSVolumeSource readOnly(Boolean readOnly) { - this.readOnly = readOnly; return this; } @@ -146,14 +141,12 @@ public Boolean getReadOnly() { return readOnly; } - public void setReadOnly(Boolean readOnly) { this.readOnly = readOnly; } public V1CephFSVolumeSource secretFile(String secretFile) { - this.secretFile = secretFile; return this; } @@ -167,14 +160,12 @@ public String getSecretFile() { return secretFile; } - public void setSecretFile(String secretFile) { this.secretFile = secretFile; } public V1CephFSVolumeSource secretRef(V1LocalObjectReference secretRef) { - this.secretRef = secretRef; return this; } @@ -188,14 +179,12 @@ public V1LocalObjectReference getSecretRef() { return secretRef; } - public void setSecretRef(V1LocalObjectReference secretRef) { this.secretRef = secretRef; } public V1CephFSVolumeSource user(String user) { - this.user = user; return this; } @@ -209,7 +198,6 @@ public String getUser() { return user; } - public void setUser(String user) { this.user = user; } @@ -283,32 +271,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1CephFSVolumeSource + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1CephFSVolumeSource */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1CephFSVolumeSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1CephFSVolumeSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1CephFSVolumeSource is not found in the empty JSON string", V1CephFSVolumeSource.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1CephFSVolumeSource.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1CephFSVolumeSource` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1CephFSVolumeSource` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1CephFSVolumeSource.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the required json array is present if (jsonObj.get("monitors") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); @@ -323,7 +312,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `secretRef` if (jsonObj.get("secretRef") != null && !jsonObj.get("secretRef").isJsonNull()) { - V1LocalObjectReference.validateJsonObject(jsonObj.getAsJsonObject("secretRef")); + V1LocalObjectReference.validateJsonElement(jsonObj.get("secretRef")); } if ((jsonObj.get("user") != null && !jsonObj.get("user").isJsonNull()) && !jsonObj.get("user").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `user` to be a primitive type in the JSON string but got `%s`", jsonObj.get("user").toString())); @@ -350,9 +339,9 @@ public void write(JsonWriter out, V1CephFSVolumeSource value) throws IOException @Override public V1CephFSVolumeSource read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -379,3 +368,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequest.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequest.java index ed0e759490..2054b31450 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequest.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequest.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1CertificateSigningRequestStatus; import io.kubernetes.client.openapi.models.V1ObjectMeta; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * CertificateSigningRequest objects provide a mechanism to obtain x509 certificates by submitting a certificate signing request, and having it asynchronously approved and issued. Kubelets use this API to obtain: 1. client certificates to authenticate to kube-apiserver (with the \"kubernetes.io/kube-apiserver-client-kubelet\" signerName). 2. serving certificates for TLS endpoints kube-apiserver can connect to securely (with the \"kubernetes.io/kubelet-serving\" signerName). This API can be used to request client certificates to authenticate to kube-apiserver (with the \"kubernetes.io/kube-apiserver-client\" signerName), or to obtain certificates from custom non-Kubernetes signers. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1CertificateSigningRequest implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -78,7 +78,6 @@ public V1CertificateSigningRequest() { } public V1CertificateSigningRequest apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -92,14 +91,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1CertificateSigningRequest kind(String kind) { - this.kind = kind; return this; } @@ -113,14 +110,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1CertificateSigningRequest metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -134,14 +129,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V1CertificateSigningRequest spec(V1CertificateSigningRequestSpec spec) { - this.spec = spec; return this; } @@ -155,14 +148,12 @@ public V1CertificateSigningRequestSpec getSpec() { return spec; } - public void setSpec(V1CertificateSigningRequestSpec spec) { this.spec = spec; } public V1CertificateSigningRequest status(V1CertificateSigningRequestStatus status) { - this.status = status; return this; } @@ -176,7 +167,6 @@ public V1CertificateSigningRequestStatus getStatus() { return status; } - public void setStatus(V1CertificateSigningRequestStatus status) { this.status = status; } @@ -247,32 +237,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1CertificateSigningRequest + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1CertificateSigningRequest */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1CertificateSigningRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1CertificateSigningRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1CertificateSigningRequest is not found in the empty JSON string", V1CertificateSigningRequest.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1CertificateSigningRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1CertificateSigningRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1CertificateSigningRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1CertificateSigningRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -281,13 +272,13 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } // validate the required field `spec` - V1CertificateSigningRequestSpec.validateJsonObject(jsonObj.getAsJsonObject("spec")); + V1CertificateSigningRequestSpec.validateJsonElement(jsonObj.get("spec")); // validate the optional field `status` if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { - V1CertificateSigningRequestStatus.validateJsonObject(jsonObj.getAsJsonObject("status")); + V1CertificateSigningRequestStatus.validateJsonElement(jsonObj.get("status")); } } @@ -311,9 +302,9 @@ public void write(JsonWriter out, V1CertificateSigningRequest value) throws IOEx @Override public V1CertificateSigningRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -340,3 +331,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequestCondition.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequestCondition.java index cc396baa6c..1b7b5cac9b 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequestCondition.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequestCondition.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * CertificateSigningRequestCondition describes a condition of a CertificateSigningRequest object */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1CertificateSigningRequestCondition { public static final String SERIALIZED_NAME_LAST_TRANSITION_TIME = "lastTransitionTime"; @SerializedName(SERIALIZED_NAME_LAST_TRANSITION_TIME) @@ -80,7 +80,6 @@ public V1CertificateSigningRequestCondition() { } public V1CertificateSigningRequestCondition lastTransitionTime(OffsetDateTime lastTransitionTime) { - this.lastTransitionTime = lastTransitionTime; return this; } @@ -94,14 +93,12 @@ public OffsetDateTime getLastTransitionTime() { return lastTransitionTime; } - public void setLastTransitionTime(OffsetDateTime lastTransitionTime) { this.lastTransitionTime = lastTransitionTime; } public V1CertificateSigningRequestCondition lastUpdateTime(OffsetDateTime lastUpdateTime) { - this.lastUpdateTime = lastUpdateTime; return this; } @@ -115,14 +112,12 @@ public OffsetDateTime getLastUpdateTime() { return lastUpdateTime; } - public void setLastUpdateTime(OffsetDateTime lastUpdateTime) { this.lastUpdateTime = lastUpdateTime; } public V1CertificateSigningRequestCondition message(String message) { - this.message = message; return this; } @@ -136,14 +131,12 @@ public String getMessage() { return message; } - public void setMessage(String message) { this.message = message; } public V1CertificateSigningRequestCondition reason(String reason) { - this.reason = reason; return this; } @@ -157,14 +150,12 @@ public String getReason() { return reason; } - public void setReason(String reason) { this.reason = reason; } public V1CertificateSigningRequestCondition status(String status) { - this.status = status; return this; } @@ -178,14 +169,12 @@ public String getStatus() { return status; } - public void setStatus(String status) { this.status = status; } public V1CertificateSigningRequestCondition type(String type) { - this.type = type; return this; } @@ -199,7 +188,6 @@ public String getType() { return type; } - public void setType(String type) { this.type = type; } @@ -274,32 +262,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1CertificateSigningRequestCondition + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1CertificateSigningRequestCondition */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1CertificateSigningRequestCondition.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1CertificateSigningRequestCondition.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1CertificateSigningRequestCondition is not found in the empty JSON string", V1CertificateSigningRequestCondition.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1CertificateSigningRequestCondition.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1CertificateSigningRequestCondition` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1CertificateSigningRequestCondition` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1CertificateSigningRequestCondition.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); } @@ -334,9 +323,9 @@ public void write(JsonWriter out, V1CertificateSigningRequestCondition value) th @Override public V1CertificateSigningRequestCondition read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -363,3 +352,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequestList.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequestList.java index 366edf4b55..3cc96d120c 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequestList.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequestList.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1ListMeta; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * CertificateSigningRequestList is a collection of CertificateSigningRequest objects */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1CertificateSigningRequestList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -75,7 +75,6 @@ public V1CertificateSigningRequestList() { } public V1CertificateSigningRequestList apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -89,14 +88,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1CertificateSigningRequestList items(List items) { - this.items = items; return this; } @@ -118,14 +115,12 @@ public List getItems() { return items; } - public void setItems(List items) { this.items = items; } public V1CertificateSigningRequestList kind(String kind) { - this.kind = kind; return this; } @@ -139,14 +134,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1CertificateSigningRequestList metadata(V1ListMeta metadata) { - this.metadata = metadata; return this; } @@ -160,7 +153,6 @@ public V1ListMeta getMetadata() { return metadata; } - public void setMetadata(V1ListMeta metadata) { this.metadata = metadata; } @@ -228,32 +220,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1CertificateSigningRequestList + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1CertificateSigningRequestList */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1CertificateSigningRequestList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1CertificateSigningRequestList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1CertificateSigningRequestList is not found in the empty JSON string", V1CertificateSigningRequestList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1CertificateSigningRequestList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1CertificateSigningRequestList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1CertificateSigningRequestList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1CertificateSigningRequestList.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -265,14 +258,14 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); // validate the required field `items` (array) for (int i = 0; i < jsonArrayitems.size(); i++) { - V1CertificateSigningRequest.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject()); + V1CertificateSigningRequest.validateJsonElement(jsonArrayitems.get(i)); }; if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ListMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ListMeta.validateJsonElement(jsonObj.get("metadata")); } } @@ -296,9 +289,9 @@ public void write(JsonWriter out, V1CertificateSigningRequestList value) throws @Override public V1CertificateSigningRequestList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -325,3 +318,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequestSpec.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequestSpec.java index 520695f025..4fa8e138f3 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequestSpec.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequestSpec.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * CertificateSigningRequestSpec contains the certificate request. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1CertificateSigningRequestSpec { public static final String SERIALIZED_NAME_EXPIRATION_SECONDS = "expirationSeconds"; @SerializedName(SERIALIZED_NAME_EXPIRATION_SECONDS) @@ -65,7 +65,7 @@ public class V1CertificateSigningRequestSpec { public static final String SERIALIZED_NAME_GROUPS = "groups"; @SerializedName(SERIALIZED_NAME_GROUPS) - private List groups; + private List groups = new ArrayList<>(); public static final String SERIALIZED_NAME_REQUEST = "request"; @SerializedName(SERIALIZED_NAME_REQUEST) @@ -81,7 +81,7 @@ public class V1CertificateSigningRequestSpec { public static final String SERIALIZED_NAME_USAGES = "usages"; @SerializedName(SERIALIZED_NAME_USAGES) - private List usages; + private List usages = new ArrayList<>(); public static final String SERIALIZED_NAME_USERNAME = "username"; @SerializedName(SERIALIZED_NAME_USERNAME) @@ -91,7 +91,6 @@ public V1CertificateSigningRequestSpec() { } public V1CertificateSigningRequestSpec expirationSeconds(Integer expirationSeconds) { - this.expirationSeconds = expirationSeconds; return this; } @@ -105,14 +104,12 @@ public Integer getExpirationSeconds() { return expirationSeconds; } - public void setExpirationSeconds(Integer expirationSeconds) { this.expirationSeconds = expirationSeconds; } public V1CertificateSigningRequestSpec extra(Map> extra) { - this.extra = extra; return this; } @@ -134,14 +131,12 @@ public Map> getExtra() { return extra; } - public void setExtra(Map> extra) { this.extra = extra; } public V1CertificateSigningRequestSpec groups(List groups) { - this.groups = groups; return this; } @@ -163,14 +158,12 @@ public List getGroups() { return groups; } - public void setGroups(List groups) { this.groups = groups; } public V1CertificateSigningRequestSpec request(byte[] request) { - this.request = request; return this; } @@ -184,14 +177,12 @@ public byte[] getRequest() { return request; } - public void setRequest(byte[] request) { this.request = request; } public V1CertificateSigningRequestSpec signerName(String signerName) { - this.signerName = signerName; return this; } @@ -205,14 +196,12 @@ public String getSignerName() { return signerName; } - public void setSignerName(String signerName) { this.signerName = signerName; } public V1CertificateSigningRequestSpec uid(String uid) { - this.uid = uid; return this; } @@ -226,14 +215,12 @@ public String getUid() { return uid; } - public void setUid(String uid) { this.uid = uid; } public V1CertificateSigningRequestSpec usages(List usages) { - this.usages = usages; return this; } @@ -255,14 +242,12 @@ public List getUsages() { return usages; } - public void setUsages(List usages) { this.usages = usages; } public V1CertificateSigningRequestSpec username(String username) { - this.username = username; return this; } @@ -276,7 +261,6 @@ public String getUsername() { return username; } - public void setUsername(String username) { this.username = username; } @@ -357,34 +341,35 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1CertificateSigningRequestSpec + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1CertificateSigningRequestSpec */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1CertificateSigningRequestSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1CertificateSigningRequestSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1CertificateSigningRequestSpec is not found in the empty JSON string", V1CertificateSigningRequestSpec.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1CertificateSigningRequestSpec.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1CertificateSigningRequestSpec` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1CertificateSigningRequestSpec` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1CertificateSigningRequestSpec.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the optional json data is an array if present - if (jsonObj.get("groups") != null && !jsonObj.get("groups").isJsonArray()) { + if (jsonObj.get("groups") != null && !jsonObj.get("groups").isJsonNull() && !jsonObj.get("groups").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `groups` to be an array in the JSON string but got `%s`", jsonObj.get("groups").toString())); } if (!jsonObj.get("signerName").isJsonPrimitive()) { @@ -394,7 +379,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("Expected the field `uid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uid").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("usages") != null && !jsonObj.get("usages").isJsonArray()) { + if (jsonObj.get("usages") != null && !jsonObj.get("usages").isJsonNull() && !jsonObj.get("usages").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `usages` to be an array in the JSON string but got `%s`", jsonObj.get("usages").toString())); } if ((jsonObj.get("username") != null && !jsonObj.get("username").isJsonNull()) && !jsonObj.get("username").isJsonPrimitive()) { @@ -422,9 +407,9 @@ public void write(JsonWriter out, V1CertificateSigningRequestSpec value) throws @Override public V1CertificateSigningRequestSpec read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -451,3 +436,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequestStatus.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequestStatus.java index f8d2a8f2ef..6abbae2b19 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequestStatus.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequestStatus.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1CertificateSigningRequestCondition; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * CertificateSigningRequestStatus contains conditions used to indicate approved/denied/failed status of the request, and the issued certificate. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1CertificateSigningRequestStatus { public static final String SERIALIZED_NAME_CERTIFICATE = "certificate"; @SerializedName(SERIALIZED_NAME_CERTIFICATE) @@ -60,13 +60,12 @@ public class V1CertificateSigningRequestStatus { public static final String SERIALIZED_NAME_CONDITIONS = "conditions"; @SerializedName(SERIALIZED_NAME_CONDITIONS) - private List conditions; + private List conditions = new ArrayList<>(); public V1CertificateSigningRequestStatus() { } public V1CertificateSigningRequestStatus certificate(byte[] certificate) { - this.certificate = certificate; return this; } @@ -80,14 +79,12 @@ public byte[] getCertificate() { return certificate; } - public void setCertificate(byte[] certificate) { this.certificate = certificate; } public V1CertificateSigningRequestStatus conditions(List conditions) { - this.conditions = conditions; return this; } @@ -109,7 +106,6 @@ public List getConditions() { return conditions; } - public void setConditions(List conditions) { this.conditions = conditions; } @@ -170,25 +166,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1CertificateSigningRequestStatus + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1CertificateSigningRequestStatus */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1CertificateSigningRequestStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1CertificateSigningRequestStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1CertificateSigningRequestStatus is not found in the empty JSON string", V1CertificateSigningRequestStatus.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1CertificateSigningRequestStatus.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1CertificateSigningRequestStatus` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1CertificateSigningRequestStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (jsonObj.get("conditions") != null && !jsonObj.get("conditions").isJsonNull()) { JsonArray jsonArrayconditions = jsonObj.getAsJsonArray("conditions"); if (jsonArrayconditions != null) { @@ -199,7 +196,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `conditions` (array) for (int i = 0; i < jsonArrayconditions.size(); i++) { - V1CertificateSigningRequestCondition.validateJsonObject(jsonArrayconditions.get(i).getAsJsonObject()); + V1CertificateSigningRequestCondition.validateJsonElement(jsonArrayconditions.get(i)); }; } } @@ -225,9 +222,9 @@ public void write(JsonWriter out, V1CertificateSigningRequestStatus value) throw @Override public V1CertificateSigningRequestStatus read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -254,3 +251,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CinderPersistentVolumeSource.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CinderPersistentVolumeSource.java index 374e19d735..51dda558a1 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CinderPersistentVolumeSource.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CinderPersistentVolumeSource.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.openapi.models.V1SecretReference; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * 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. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1CinderPersistentVolumeSource { public static final String SERIALIZED_NAME_FS_TYPE = "fsType"; @SerializedName(SERIALIZED_NAME_FS_TYPE) @@ -72,7 +72,6 @@ public V1CinderPersistentVolumeSource() { } public V1CinderPersistentVolumeSource fsType(String fsType) { - this.fsType = fsType; return this; } @@ -86,14 +85,12 @@ public String getFsType() { return fsType; } - public void setFsType(String fsType) { this.fsType = fsType; } public V1CinderPersistentVolumeSource readOnly(Boolean readOnly) { - this.readOnly = readOnly; return this; } @@ -107,14 +104,12 @@ public Boolean getReadOnly() { return readOnly; } - public void setReadOnly(Boolean readOnly) { this.readOnly = readOnly; } public V1CinderPersistentVolumeSource secretRef(V1SecretReference secretRef) { - this.secretRef = secretRef; return this; } @@ -128,14 +123,12 @@ public V1SecretReference getSecretRef() { return secretRef; } - public void setSecretRef(V1SecretReference secretRef) { this.secretRef = secretRef; } public V1CinderPersistentVolumeSource volumeID(String volumeID) { - this.volumeID = volumeID; return this; } @@ -149,7 +142,6 @@ public String getVolumeID() { return volumeID; } - public void setVolumeID(String volumeID) { this.volumeID = volumeID; } @@ -217,38 +209,39 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1CinderPersistentVolumeSource + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1CinderPersistentVolumeSource */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1CinderPersistentVolumeSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1CinderPersistentVolumeSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1CinderPersistentVolumeSource is not found in the empty JSON string", V1CinderPersistentVolumeSource.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1CinderPersistentVolumeSource.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1CinderPersistentVolumeSource` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1CinderPersistentVolumeSource` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1CinderPersistentVolumeSource.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("fsType") != null && !jsonObj.get("fsType").isJsonNull()) && !jsonObj.get("fsType").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `fsType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fsType").toString())); } // validate the optional field `secretRef` if (jsonObj.get("secretRef") != null && !jsonObj.get("secretRef").isJsonNull()) { - V1SecretReference.validateJsonObject(jsonObj.getAsJsonObject("secretRef")); + V1SecretReference.validateJsonElement(jsonObj.get("secretRef")); } if (!jsonObj.get("volumeID").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `volumeID` to be a primitive type in the JSON string but got `%s`", jsonObj.get("volumeID").toString())); @@ -275,9 +268,9 @@ public void write(JsonWriter out, V1CinderPersistentVolumeSource value) throws I @Override public V1CinderPersistentVolumeSource read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -304,3 +297,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CinderVolumeSource.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CinderVolumeSource.java index e29ac54544..9e42fdd377 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CinderVolumeSource.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CinderVolumeSource.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.openapi.models.V1LocalObjectReference; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * 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. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1CinderVolumeSource { public static final String SERIALIZED_NAME_FS_TYPE = "fsType"; @SerializedName(SERIALIZED_NAME_FS_TYPE) @@ -72,7 +72,6 @@ public V1CinderVolumeSource() { } public V1CinderVolumeSource fsType(String fsType) { - this.fsType = fsType; return this; } @@ -86,14 +85,12 @@ public String getFsType() { return fsType; } - public void setFsType(String fsType) { this.fsType = fsType; } public V1CinderVolumeSource readOnly(Boolean readOnly) { - this.readOnly = readOnly; return this; } @@ -107,14 +104,12 @@ public Boolean getReadOnly() { return readOnly; } - public void setReadOnly(Boolean readOnly) { this.readOnly = readOnly; } public V1CinderVolumeSource secretRef(V1LocalObjectReference secretRef) { - this.secretRef = secretRef; return this; } @@ -128,14 +123,12 @@ public V1LocalObjectReference getSecretRef() { return secretRef; } - public void setSecretRef(V1LocalObjectReference secretRef) { this.secretRef = secretRef; } public V1CinderVolumeSource volumeID(String volumeID) { - this.volumeID = volumeID; return this; } @@ -149,7 +142,6 @@ public String getVolumeID() { return volumeID; } - public void setVolumeID(String volumeID) { this.volumeID = volumeID; } @@ -217,38 +209,39 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1CinderVolumeSource + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1CinderVolumeSource */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1CinderVolumeSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1CinderVolumeSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1CinderVolumeSource is not found in the empty JSON string", V1CinderVolumeSource.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1CinderVolumeSource.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1CinderVolumeSource` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1CinderVolumeSource` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1CinderVolumeSource.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("fsType") != null && !jsonObj.get("fsType").isJsonNull()) && !jsonObj.get("fsType").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `fsType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fsType").toString())); } // validate the optional field `secretRef` if (jsonObj.get("secretRef") != null && !jsonObj.get("secretRef").isJsonNull()) { - V1LocalObjectReference.validateJsonObject(jsonObj.getAsJsonObject("secretRef")); + V1LocalObjectReference.validateJsonElement(jsonObj.get("secretRef")); } if (!jsonObj.get("volumeID").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `volumeID` to be a primitive type in the JSON string but got `%s`", jsonObj.get("volumeID").toString())); @@ -275,9 +268,9 @@ public void write(JsonWriter out, V1CinderVolumeSource value) throws IOException @Override public V1CinderVolumeSource read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -304,3 +297,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ClaimSource.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ClaimSource.java index 36faed7f2f..8c420aabb4 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ClaimSource.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ClaimSource.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * ClaimSource describes a reference to a ResourceClaim. Exactly one of these fields should be set. Consumers of this type must treat an empty object as if it has an unknown value. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ClaimSource { public static final String SERIALIZED_NAME_RESOURCE_CLAIM_NAME = "resourceClaimName"; @SerializedName(SERIALIZED_NAME_RESOURCE_CLAIM_NAME) @@ -63,7 +63,6 @@ public V1ClaimSource() { } public V1ClaimSource resourceClaimName(String resourceClaimName) { - this.resourceClaimName = resourceClaimName; return this; } @@ -77,14 +76,12 @@ public String getResourceClaimName() { return resourceClaimName; } - public void setResourceClaimName(String resourceClaimName) { this.resourceClaimName = resourceClaimName; } public V1ClaimSource resourceClaimTemplateName(String resourceClaimTemplateName) { - this.resourceClaimTemplateName = resourceClaimTemplateName; return this; } @@ -98,7 +95,6 @@ public String getResourceClaimTemplateName() { return resourceClaimTemplateName; } - public void setResourceClaimTemplateName(String resourceClaimTemplateName) { this.resourceClaimTemplateName = resourceClaimTemplateName; } @@ -159,25 +155,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ClaimSource + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ClaimSource */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ClaimSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ClaimSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ClaimSource is not found in the empty JSON string", V1ClaimSource.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ClaimSource.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ClaimSource` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ClaimSource` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("resourceClaimName") != null && !jsonObj.get("resourceClaimName").isJsonNull()) && !jsonObj.get("resourceClaimName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `resourceClaimName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("resourceClaimName").toString())); } @@ -206,9 +203,9 @@ public void write(JsonWriter out, V1ClaimSource value) throws IOException { @Override public V1ClaimSource read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -235,3 +232,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ClientIPConfig.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ClientIPConfig.java index 6b9c5678e2..c7405e27bb 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ClientIPConfig.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ClientIPConfig.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * ClientIPConfig represents the configurations of Client IP based session affinity. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ClientIPConfig { public static final String SERIALIZED_NAME_TIMEOUT_SECONDS = "timeoutSeconds"; @SerializedName(SERIALIZED_NAME_TIMEOUT_SECONDS) @@ -59,7 +59,6 @@ public V1ClientIPConfig() { } public V1ClientIPConfig timeoutSeconds(Integer timeoutSeconds) { - this.timeoutSeconds = timeoutSeconds; return this; } @@ -73,7 +72,6 @@ public Integer getTimeoutSeconds() { return timeoutSeconds; } - public void setTimeoutSeconds(Integer timeoutSeconds) { this.timeoutSeconds = timeoutSeconds; } @@ -131,25 +129,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ClientIPConfig + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ClientIPConfig */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ClientIPConfig.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ClientIPConfig.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ClientIPConfig is not found in the empty JSON string", V1ClientIPConfig.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ClientIPConfig.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ClientIPConfig` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ClientIPConfig` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -172,9 +171,9 @@ public void write(JsonWriter out, V1ClientIPConfig value) throws IOException { @Override public V1ClientIPConfig read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -201,3 +200,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ClusterRole.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ClusterRole.java index 44062f3746..39a949b2ab 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ClusterRole.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ClusterRole.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -24,6 +24,7 @@ import io.kubernetes.client.openapi.models.V1PolicyRule; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -46,7 +47,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -54,7 +54,7 @@ /** * ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ClusterRole implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_AGGREGATION_RULE = "aggregationRule"; @SerializedName(SERIALIZED_NAME_AGGREGATION_RULE) @@ -74,13 +74,12 @@ public class V1ClusterRole implements io.kubernetes.client.common.KubernetesObje public static final String SERIALIZED_NAME_RULES = "rules"; @SerializedName(SERIALIZED_NAME_RULES) - private List rules; + private List rules = new ArrayList<>(); public V1ClusterRole() { } public V1ClusterRole aggregationRule(V1AggregationRule aggregationRule) { - this.aggregationRule = aggregationRule; return this; } @@ -94,14 +93,12 @@ public V1AggregationRule getAggregationRule() { return aggregationRule; } - public void setAggregationRule(V1AggregationRule aggregationRule) { this.aggregationRule = aggregationRule; } public V1ClusterRole apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -115,14 +112,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1ClusterRole kind(String kind) { - this.kind = kind; return this; } @@ -136,14 +131,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1ClusterRole metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -157,14 +150,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V1ClusterRole rules(List rules) { - this.rules = rules; return this; } @@ -186,7 +177,6 @@ public List getRules() { return rules; } - public void setRules(List rules) { this.rules = rules; } @@ -256,28 +246,29 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ClusterRole + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ClusterRole */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ClusterRole.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ClusterRole.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ClusterRole is not found in the empty JSON string", V1ClusterRole.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ClusterRole.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ClusterRole` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ClusterRole` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `aggregationRule` if (jsonObj.get("aggregationRule") != null && !jsonObj.get("aggregationRule").isJsonNull()) { - V1AggregationRule.validateJsonObject(jsonObj.getAsJsonObject("aggregationRule")); + V1AggregationRule.validateJsonElement(jsonObj.get("aggregationRule")); } if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); @@ -287,7 +278,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } if (jsonObj.get("rules") != null && !jsonObj.get("rules").isJsonNull()) { JsonArray jsonArrayrules = jsonObj.getAsJsonArray("rules"); @@ -299,7 +290,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `rules` (array) for (int i = 0; i < jsonArrayrules.size(); i++) { - V1PolicyRule.validateJsonObject(jsonArrayrules.get(i).getAsJsonObject()); + V1PolicyRule.validateJsonElement(jsonArrayrules.get(i)); }; } } @@ -325,9 +316,9 @@ public void write(JsonWriter out, V1ClusterRole value) throws IOException { @Override public V1ClusterRole read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -354,3 +345,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ClusterRoleBinding.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ClusterRoleBinding.java index bbb51fc18f..85fc02c925 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ClusterRoleBinding.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ClusterRoleBinding.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -24,6 +24,7 @@ import io.kubernetes.client.openapi.models.V1RoleRef; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -46,7 +47,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -54,7 +54,7 @@ /** * ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ClusterRoleBinding implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -74,13 +74,12 @@ public class V1ClusterRoleBinding implements io.kubernetes.client.common.Kuberne public static final String SERIALIZED_NAME_SUBJECTS = "subjects"; @SerializedName(SERIALIZED_NAME_SUBJECTS) - private List subjects; + private List subjects = new ArrayList<>(); public V1ClusterRoleBinding() { } public V1ClusterRoleBinding apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -94,14 +93,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1ClusterRoleBinding kind(String kind) { - this.kind = kind; return this; } @@ -115,14 +112,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1ClusterRoleBinding metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -136,14 +131,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V1ClusterRoleBinding roleRef(V1RoleRef roleRef) { - this.roleRef = roleRef; return this; } @@ -157,14 +150,12 @@ public V1RoleRef getRoleRef() { return roleRef; } - public void setRoleRef(V1RoleRef roleRef) { this.roleRef = roleRef; } public V1ClusterRoleBinding subjects(List subjects) { - this.subjects = subjects; return this; } @@ -186,7 +177,6 @@ public List getSubjects() { return subjects; } - public void setSubjects(List subjects) { this.subjects = subjects; } @@ -257,32 +247,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ClusterRoleBinding + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ClusterRoleBinding */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ClusterRoleBinding.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ClusterRoleBinding.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ClusterRoleBinding is not found in the empty JSON string", V1ClusterRoleBinding.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ClusterRoleBinding.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ClusterRoleBinding` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ClusterRoleBinding` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1ClusterRoleBinding.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -291,10 +282,10 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } // validate the required field `roleRef` - V1RoleRef.validateJsonObject(jsonObj.getAsJsonObject("roleRef")); + V1RoleRef.validateJsonElement(jsonObj.get("roleRef")); if (jsonObj.get("subjects") != null && !jsonObj.get("subjects").isJsonNull()) { JsonArray jsonArraysubjects = jsonObj.getAsJsonArray("subjects"); if (jsonArraysubjects != null) { @@ -305,7 +296,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `subjects` (array) for (int i = 0; i < jsonArraysubjects.size(); i++) { - RbacV1Subject.validateJsonObject(jsonArraysubjects.get(i).getAsJsonObject()); + RbacV1Subject.validateJsonElement(jsonArraysubjects.get(i)); }; } } @@ -331,9 +322,9 @@ public void write(JsonWriter out, V1ClusterRoleBinding value) throws IOException @Override public V1ClusterRoleBinding read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -360,3 +351,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ClusterRoleBindingList.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ClusterRoleBindingList.java index 4300351714..99310f2f49 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ClusterRoleBindingList.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ClusterRoleBindingList.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1ListMeta; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * ClusterRoleBindingList is a collection of ClusterRoleBindings */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ClusterRoleBindingList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -75,7 +75,6 @@ public V1ClusterRoleBindingList() { } public V1ClusterRoleBindingList apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -89,14 +88,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1ClusterRoleBindingList items(List items) { - this.items = items; return this; } @@ -118,14 +115,12 @@ public List getItems() { return items; } - public void setItems(List items) { this.items = items; } public V1ClusterRoleBindingList kind(String kind) { - this.kind = kind; return this; } @@ -139,14 +134,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1ClusterRoleBindingList metadata(V1ListMeta metadata) { - this.metadata = metadata; return this; } @@ -160,7 +153,6 @@ public V1ListMeta getMetadata() { return metadata; } - public void setMetadata(V1ListMeta metadata) { this.metadata = metadata; } @@ -228,32 +220,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ClusterRoleBindingList + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ClusterRoleBindingList */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ClusterRoleBindingList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ClusterRoleBindingList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ClusterRoleBindingList is not found in the empty JSON string", V1ClusterRoleBindingList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ClusterRoleBindingList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ClusterRoleBindingList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ClusterRoleBindingList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1ClusterRoleBindingList.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -265,14 +258,14 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); // validate the required field `items` (array) for (int i = 0; i < jsonArrayitems.size(); i++) { - V1ClusterRoleBinding.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject()); + V1ClusterRoleBinding.validateJsonElement(jsonArrayitems.get(i)); }; if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ListMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ListMeta.validateJsonElement(jsonObj.get("metadata")); } } @@ -296,9 +289,9 @@ public void write(JsonWriter out, V1ClusterRoleBindingList value) throws IOExcep @Override public V1ClusterRoleBindingList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -325,3 +318,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ClusterRoleList.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ClusterRoleList.java index ab95ca7662..57dc6d416d 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ClusterRoleList.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ClusterRoleList.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1ListMeta; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * ClusterRoleList is a collection of ClusterRoles */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ClusterRoleList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -75,7 +75,6 @@ public V1ClusterRoleList() { } public V1ClusterRoleList apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -89,14 +88,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1ClusterRoleList items(List items) { - this.items = items; return this; } @@ -118,14 +115,12 @@ public List getItems() { return items; } - public void setItems(List items) { this.items = items; } public V1ClusterRoleList kind(String kind) { - this.kind = kind; return this; } @@ -139,14 +134,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1ClusterRoleList metadata(V1ListMeta metadata) { - this.metadata = metadata; return this; } @@ -160,7 +153,6 @@ public V1ListMeta getMetadata() { return metadata; } - public void setMetadata(V1ListMeta metadata) { this.metadata = metadata; } @@ -228,32 +220,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ClusterRoleList + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ClusterRoleList */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ClusterRoleList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ClusterRoleList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ClusterRoleList is not found in the empty JSON string", V1ClusterRoleList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ClusterRoleList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ClusterRoleList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ClusterRoleList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1ClusterRoleList.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -265,14 +258,14 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); // validate the required field `items` (array) for (int i = 0; i < jsonArrayitems.size(); i++) { - V1ClusterRole.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject()); + V1ClusterRole.validateJsonElement(jsonArrayitems.get(i)); }; if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ListMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ListMeta.validateJsonElement(jsonObj.get("metadata")); } } @@ -296,9 +289,9 @@ public void write(JsonWriter out, V1ClusterRoleList value) throws IOException { @Override public V1ClusterRoleList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -325,3 +318,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ClusterTrustBundleProjection.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ClusterTrustBundleProjection.java index 57a526f61c..1d9d7691ea 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ClusterTrustBundleProjection.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ClusterTrustBundleProjection.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.openapi.models.V1LabelSelector; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * ClusterTrustBundleProjection describes how to select a set of ClusterTrustBundle objects and project their contents into the pod filesystem. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ClusterTrustBundleProjection { public static final String SERIALIZED_NAME_LABEL_SELECTOR = "labelSelector"; @SerializedName(SERIALIZED_NAME_LABEL_SELECTOR) @@ -76,7 +76,6 @@ public V1ClusterTrustBundleProjection() { } public V1ClusterTrustBundleProjection labelSelector(V1LabelSelector labelSelector) { - this.labelSelector = labelSelector; return this; } @@ -90,14 +89,12 @@ public V1LabelSelector getLabelSelector() { return labelSelector; } - public void setLabelSelector(V1LabelSelector labelSelector) { this.labelSelector = labelSelector; } public V1ClusterTrustBundleProjection name(String name) { - this.name = name; return this; } @@ -111,14 +108,12 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } public V1ClusterTrustBundleProjection optional(Boolean optional) { - this.optional = optional; return this; } @@ -132,14 +127,12 @@ public Boolean getOptional() { return optional; } - public void setOptional(Boolean optional) { this.optional = optional; } public V1ClusterTrustBundleProjection path(String path) { - this.path = path; return this; } @@ -153,14 +146,12 @@ public String getPath() { return path; } - public void setPath(String path) { this.path = path; } public V1ClusterTrustBundleProjection signerName(String signerName) { - this.signerName = signerName; return this; } @@ -174,7 +165,6 @@ public String getSignerName() { return signerName; } - public void setSignerName(String signerName) { this.signerName = signerName; } @@ -245,35 +235,36 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ClusterTrustBundleProjection + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ClusterTrustBundleProjection */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ClusterTrustBundleProjection.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ClusterTrustBundleProjection.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ClusterTrustBundleProjection is not found in the empty JSON string", V1ClusterTrustBundleProjection.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ClusterTrustBundleProjection.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ClusterTrustBundleProjection` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ClusterTrustBundleProjection` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1ClusterTrustBundleProjection.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `labelSelector` if (jsonObj.get("labelSelector") != null && !jsonObj.get("labelSelector").isJsonNull()) { - V1LabelSelector.validateJsonObject(jsonObj.getAsJsonObject("labelSelector")); + V1LabelSelector.validateJsonElement(jsonObj.get("labelSelector")); } if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); @@ -306,9 +297,9 @@ public void write(JsonWriter out, V1ClusterTrustBundleProjection value) throws I @Override public V1ClusterTrustBundleProjection read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -335,3 +326,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ComponentCondition.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ComponentCondition.java index afa0b924af..d9afaf500d 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ComponentCondition.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ComponentCondition.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * Information about the condition of a component. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ComponentCondition { public static final String SERIALIZED_NAME_ERROR = "error"; @SerializedName(SERIALIZED_NAME_ERROR) @@ -71,7 +71,6 @@ public V1ComponentCondition() { } public V1ComponentCondition error(String error) { - this.error = error; return this; } @@ -85,14 +84,12 @@ public String getError() { return error; } - public void setError(String error) { this.error = error; } public V1ComponentCondition message(String message) { - this.message = message; return this; } @@ -106,14 +103,12 @@ public String getMessage() { return message; } - public void setMessage(String message) { this.message = message; } public V1ComponentCondition status(String status) { - this.status = status; return this; } @@ -127,14 +122,12 @@ public String getStatus() { return status; } - public void setStatus(String status) { this.status = status; } public V1ComponentCondition type(String type) { - this.type = type; return this; } @@ -148,7 +141,6 @@ public String getType() { return type; } - public void setType(String type) { this.type = type; } @@ -217,32 +209,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ComponentCondition + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ComponentCondition */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ComponentCondition.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ComponentCondition.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ComponentCondition is not found in the empty JSON string", V1ComponentCondition.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ComponentCondition.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ComponentCondition` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ComponentCondition` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1ComponentCondition.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("error") != null && !jsonObj.get("error").isJsonNull()) && !jsonObj.get("error").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `error` to be a primitive type in the JSON string but got `%s`", jsonObj.get("error").toString())); } @@ -277,9 +270,9 @@ public void write(JsonWriter out, V1ComponentCondition value) throws IOException @Override public V1ComponentCondition read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -306,3 +299,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ComponentStatus.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ComponentStatus.java index 537be413ba..8207f1f18d 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ComponentStatus.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ComponentStatus.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1ObjectMeta; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * ComponentStatus (and ComponentStatusList) holds the cluster validation info. Deprecated: This API is deprecated in v1.19+ */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ComponentStatus implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -61,7 +61,7 @@ public class V1ComponentStatus implements io.kubernetes.client.common.Kubernetes public static final String SERIALIZED_NAME_CONDITIONS = "conditions"; @SerializedName(SERIALIZED_NAME_CONDITIONS) - private List conditions; + private List conditions = new ArrayList<>(); public static final String SERIALIZED_NAME_KIND = "kind"; @SerializedName(SERIALIZED_NAME_KIND) @@ -75,7 +75,6 @@ public V1ComponentStatus() { } public V1ComponentStatus apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -89,14 +88,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1ComponentStatus conditions(List conditions) { - this.conditions = conditions; return this; } @@ -118,14 +115,12 @@ public List getConditions() { return conditions; } - public void setConditions(List conditions) { this.conditions = conditions; } public V1ComponentStatus kind(String kind) { - this.kind = kind; return this; } @@ -139,14 +134,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1ComponentStatus metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -160,7 +153,6 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } @@ -227,25 +219,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ComponentStatus + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ComponentStatus */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ComponentStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ComponentStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ComponentStatus is not found in the empty JSON string", V1ComponentStatus.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ComponentStatus.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ComponentStatus` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ComponentStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -259,7 +252,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `conditions` (array) for (int i = 0; i < jsonArrayconditions.size(); i++) { - V1ComponentCondition.validateJsonObject(jsonArrayconditions.get(i).getAsJsonObject()); + V1ComponentCondition.validateJsonElement(jsonArrayconditions.get(i)); }; } } @@ -268,7 +261,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } } @@ -292,9 +285,9 @@ public void write(JsonWriter out, V1ComponentStatus value) throws IOException { @Override public V1ComponentStatus read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -321,3 +314,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ComponentStatusList.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ComponentStatusList.java index 33d825fb05..671941ac53 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ComponentStatusList.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ComponentStatusList.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1ListMeta; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * Status of all the conditions for the component as a list of ComponentStatus objects. Deprecated: This API is deprecated in v1.19+ */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ComponentStatusList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -75,7 +75,6 @@ public V1ComponentStatusList() { } public V1ComponentStatusList apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -89,14 +88,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1ComponentStatusList items(List items) { - this.items = items; return this; } @@ -118,14 +115,12 @@ public List getItems() { return items; } - public void setItems(List items) { this.items = items; } public V1ComponentStatusList kind(String kind) { - this.kind = kind; return this; } @@ -139,14 +134,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1ComponentStatusList metadata(V1ListMeta metadata) { - this.metadata = metadata; return this; } @@ -160,7 +153,6 @@ public V1ListMeta getMetadata() { return metadata; } - public void setMetadata(V1ListMeta metadata) { this.metadata = metadata; } @@ -228,32 +220,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ComponentStatusList + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ComponentStatusList */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ComponentStatusList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ComponentStatusList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ComponentStatusList is not found in the empty JSON string", V1ComponentStatusList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ComponentStatusList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ComponentStatusList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ComponentStatusList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1ComponentStatusList.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -265,14 +258,14 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); // validate the required field `items` (array) for (int i = 0; i < jsonArrayitems.size(); i++) { - V1ComponentStatus.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject()); + V1ComponentStatus.validateJsonElement(jsonArrayitems.get(i)); }; if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ListMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ListMeta.validateJsonElement(jsonObj.get("metadata")); } } @@ -296,9 +289,9 @@ public void write(JsonWriter out, V1ComponentStatusList value) throws IOExceptio @Override public V1ComponentStatusList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -325,3 +318,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Condition.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Condition.java index 370bc83e33..5cb48725bd 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Condition.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Condition.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * Condition contains details for one aspect of the current state of this API Resource. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1Condition { public static final String SERIALIZED_NAME_LAST_TRANSITION_TIME = "lastTransitionTime"; @SerializedName(SERIALIZED_NAME_LAST_TRANSITION_TIME) @@ -80,7 +80,6 @@ public V1Condition() { } public V1Condition lastTransitionTime(OffsetDateTime lastTransitionTime) { - this.lastTransitionTime = lastTransitionTime; return this; } @@ -94,14 +93,12 @@ public OffsetDateTime getLastTransitionTime() { return lastTransitionTime; } - public void setLastTransitionTime(OffsetDateTime lastTransitionTime) { this.lastTransitionTime = lastTransitionTime; } public V1Condition message(String message) { - this.message = message; return this; } @@ -115,14 +112,12 @@ public String getMessage() { return message; } - public void setMessage(String message) { this.message = message; } public V1Condition observedGeneration(Long observedGeneration) { - this.observedGeneration = observedGeneration; return this; } @@ -136,14 +131,12 @@ public Long getObservedGeneration() { return observedGeneration; } - public void setObservedGeneration(Long observedGeneration) { this.observedGeneration = observedGeneration; } public V1Condition reason(String reason) { - this.reason = reason; return this; } @@ -157,14 +150,12 @@ public String getReason() { return reason; } - public void setReason(String reason) { this.reason = reason; } public V1Condition status(String status) { - this.status = status; return this; } @@ -178,14 +169,12 @@ public String getStatus() { return status; } - public void setStatus(String status) { this.status = status; } public V1Condition type(String type) { - this.type = type; return this; } @@ -199,7 +188,6 @@ public String getType() { return type; } - public void setType(String type) { this.type = type; } @@ -277,32 +265,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1Condition + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1Condition */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1Condition.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1Condition.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1Condition is not found in the empty JSON string", V1Condition.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1Condition.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1Condition` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1Condition` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1Condition.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("message").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); } @@ -337,9 +326,9 @@ public void write(JsonWriter out, V1Condition value) throws IOException { @Override public V1Condition read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -366,3 +355,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMap.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMap.java index 9ab532ce37..8393029d1c 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMap.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMap.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.openapi.models.V1ObjectMeta; import java.io.IOException; +import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * ConfigMap holds configuration data for pods to consume. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ConfigMap implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -82,7 +82,6 @@ public V1ConfigMap() { } public V1ConfigMap apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -96,14 +95,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1ConfigMap binaryData(Map binaryData) { - this.binaryData = binaryData; return this; } @@ -125,14 +122,12 @@ public Map getBinaryData() { return binaryData; } - public void setBinaryData(Map binaryData) { this.binaryData = binaryData; } public V1ConfigMap data(Map data) { - this.data = data; return this; } @@ -154,14 +149,12 @@ public Map getData() { return data; } - public void setData(Map data) { this.data = data; } public V1ConfigMap immutable(Boolean immutable) { - this.immutable = immutable; return this; } @@ -175,14 +168,12 @@ public Boolean getImmutable() { return immutable; } - public void setImmutable(Boolean immutable) { this.immutable = immutable; } public V1ConfigMap kind(String kind) { - this.kind = kind; return this; } @@ -196,14 +187,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1ConfigMap metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -217,7 +206,6 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } @@ -290,25 +278,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ConfigMap + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ConfigMap */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ConfigMap.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ConfigMap.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ConfigMap is not found in the empty JSON string", V1ConfigMap.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ConfigMap.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ConfigMap` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ConfigMap` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -317,7 +306,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } } @@ -341,9 +330,9 @@ public void write(JsonWriter out, V1ConfigMap value) throws IOException { @Override public V1ConfigMap read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -370,3 +359,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapEnvSource.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapEnvSource.java index 354cd017d9..d995e7d8ac 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapEnvSource.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapEnvSource.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * 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. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ConfigMapEnvSource { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) @@ -63,13 +63,12 @@ public V1ConfigMapEnvSource() { } public V1ConfigMapEnvSource name(String name) { - this.name = name; return this; } /** - * Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + * Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names * @return name **/ @jakarta.annotation.Nullable @@ -77,14 +76,12 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } public V1ConfigMapEnvSource optional(Boolean optional) { - this.optional = optional; return this; } @@ -98,7 +95,6 @@ public Boolean getOptional() { return optional; } - public void setOptional(Boolean optional) { this.optional = optional; } @@ -159,25 +155,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ConfigMapEnvSource + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ConfigMapEnvSource */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ConfigMapEnvSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ConfigMapEnvSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ConfigMapEnvSource is not found in the empty JSON string", V1ConfigMapEnvSource.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ConfigMapEnvSource.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ConfigMapEnvSource` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ConfigMapEnvSource` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } @@ -203,9 +200,9 @@ public void write(JsonWriter out, V1ConfigMapEnvSource value) throws IOException @Override public V1ConfigMapEnvSource read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -232,3 +229,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapKeySelector.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapKeySelector.java index fdf87380c9..526e30aa3d 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapKeySelector.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapKeySelector.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * Selects a key from a ConfigMap. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ConfigMapKeySelector { public static final String SERIALIZED_NAME_KEY = "key"; @SerializedName(SERIALIZED_NAME_KEY) @@ -67,7 +67,6 @@ public V1ConfigMapKeySelector() { } public V1ConfigMapKeySelector key(String key) { - this.key = key; return this; } @@ -81,20 +80,18 @@ public String getKey() { return key; } - public void setKey(String key) { this.key = key; } public V1ConfigMapKeySelector name(String name) { - this.name = name; return this; } /** - * Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + * Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names * @return name **/ @jakarta.annotation.Nullable @@ -102,14 +99,12 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } public V1ConfigMapKeySelector optional(Boolean optional) { - this.optional = optional; return this; } @@ -123,7 +118,6 @@ public Boolean getOptional() { return optional; } - public void setOptional(Boolean optional) { this.optional = optional; } @@ -188,32 +182,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ConfigMapKeySelector + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ConfigMapKeySelector */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ConfigMapKeySelector.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ConfigMapKeySelector.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ConfigMapKeySelector is not found in the empty JSON string", V1ConfigMapKeySelector.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ConfigMapKeySelector.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ConfigMapKeySelector` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ConfigMapKeySelector` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1ConfigMapKeySelector.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("key").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `key` to be a primitive type in the JSON string but got `%s`", jsonObj.get("key").toString())); } @@ -242,9 +237,9 @@ public void write(JsonWriter out, V1ConfigMapKeySelector value) throws IOExcepti @Override public V1ConfigMapKeySelector read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -271,3 +266,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapList.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapList.java index 44481169d7..45d22f96f5 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapList.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapList.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1ListMeta; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * ConfigMapList is a resource containing a list of ConfigMap objects. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ConfigMapList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -75,7 +75,6 @@ public V1ConfigMapList() { } public V1ConfigMapList apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -89,14 +88,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1ConfigMapList items(List items) { - this.items = items; return this; } @@ -118,14 +115,12 @@ public List getItems() { return items; } - public void setItems(List items) { this.items = items; } public V1ConfigMapList kind(String kind) { - this.kind = kind; return this; } @@ -139,14 +134,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1ConfigMapList metadata(V1ListMeta metadata) { - this.metadata = metadata; return this; } @@ -160,7 +153,6 @@ public V1ListMeta getMetadata() { return metadata; } - public void setMetadata(V1ListMeta metadata) { this.metadata = metadata; } @@ -228,32 +220,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ConfigMapList + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ConfigMapList */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ConfigMapList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ConfigMapList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ConfigMapList is not found in the empty JSON string", V1ConfigMapList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ConfigMapList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ConfigMapList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ConfigMapList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1ConfigMapList.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -265,14 +258,14 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); // validate the required field `items` (array) for (int i = 0; i < jsonArrayitems.size(); i++) { - V1ConfigMap.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject()); + V1ConfigMap.validateJsonElement(jsonArrayitems.get(i)); }; if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ListMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ListMeta.validateJsonElement(jsonObj.get("metadata")); } } @@ -296,9 +289,9 @@ public void write(JsonWriter out, V1ConfigMapList value) throws IOException { @Override public V1ConfigMapList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -325,3 +318,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapNodeConfigSource.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapNodeConfigSource.java index 26b17b7f07..7d4dd02d18 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapNodeConfigSource.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapNodeConfigSource.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * ConfigMapNodeConfigSource contains the information to reference a ConfigMap as a config source for the Node. This API is deprecated since 1.22: https://git.k8s.io/enhancements/keps/sig-node/281-dynamic-kubelet-configuration */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ConfigMapNodeConfigSource { public static final String SERIALIZED_NAME_KUBELET_CONFIG_KEY = "kubeletConfigKey"; @SerializedName(SERIALIZED_NAME_KUBELET_CONFIG_KEY) @@ -75,7 +75,6 @@ public V1ConfigMapNodeConfigSource() { } public V1ConfigMapNodeConfigSource kubeletConfigKey(String kubeletConfigKey) { - this.kubeletConfigKey = kubeletConfigKey; return this; } @@ -89,14 +88,12 @@ public String getKubeletConfigKey() { return kubeletConfigKey; } - public void setKubeletConfigKey(String kubeletConfigKey) { this.kubeletConfigKey = kubeletConfigKey; } public V1ConfigMapNodeConfigSource name(String name) { - this.name = name; return this; } @@ -110,14 +107,12 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } public V1ConfigMapNodeConfigSource namespace(String namespace) { - this.namespace = namespace; return this; } @@ -131,14 +126,12 @@ public String getNamespace() { return namespace; } - public void setNamespace(String namespace) { this.namespace = namespace; } public V1ConfigMapNodeConfigSource resourceVersion(String resourceVersion) { - this.resourceVersion = resourceVersion; return this; } @@ -152,14 +145,12 @@ public String getResourceVersion() { return resourceVersion; } - public void setResourceVersion(String resourceVersion) { this.resourceVersion = resourceVersion; } public V1ConfigMapNodeConfigSource uid(String uid) { - this.uid = uid; return this; } @@ -173,7 +164,6 @@ public String getUid() { return uid; } - public void setUid(String uid) { this.uid = uid; } @@ -246,32 +236,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ConfigMapNodeConfigSource + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ConfigMapNodeConfigSource */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ConfigMapNodeConfigSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ConfigMapNodeConfigSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ConfigMapNodeConfigSource is not found in the empty JSON string", V1ConfigMapNodeConfigSource.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ConfigMapNodeConfigSource.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ConfigMapNodeConfigSource` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ConfigMapNodeConfigSource` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1ConfigMapNodeConfigSource.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("kubeletConfigKey").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kubeletConfigKey` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kubeletConfigKey").toString())); } @@ -309,9 +300,9 @@ public void write(JsonWriter out, V1ConfigMapNodeConfigSource value) throws IOEx @Override public V1ConfigMapNodeConfigSource read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -338,3 +329,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapProjection.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapProjection.java index e240d8160b..2a1ddaa99e 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapProjection.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapProjection.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1KeyToPath; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,11 +52,11 @@ /** * 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. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ConfigMapProjection { public static final String SERIALIZED_NAME_ITEMS = "items"; @SerializedName(SERIALIZED_NAME_ITEMS) - private List items; + private List items = new ArrayList<>(); public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) @@ -70,7 +70,6 @@ public V1ConfigMapProjection() { } public V1ConfigMapProjection items(List items) { - this.items = items; return this; } @@ -92,20 +91,18 @@ public List getItems() { return items; } - public void setItems(List items) { this.items = items; } public V1ConfigMapProjection name(String name) { - this.name = name; return this; } /** - * Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + * Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names * @return name **/ @jakarta.annotation.Nullable @@ -113,14 +110,12 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } public V1ConfigMapProjection optional(Boolean optional) { - this.optional = optional; return this; } @@ -134,7 +129,6 @@ public Boolean getOptional() { return optional; } - public void setOptional(Boolean optional) { this.optional = optional; } @@ -198,25 +192,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ConfigMapProjection + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ConfigMapProjection */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ConfigMapProjection.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ConfigMapProjection.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ConfigMapProjection is not found in the empty JSON string", V1ConfigMapProjection.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ConfigMapProjection.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ConfigMapProjection` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ConfigMapProjection` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (jsonObj.get("items") != null && !jsonObj.get("items").isJsonNull()) { JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); if (jsonArrayitems != null) { @@ -227,7 +222,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `items` (array) for (int i = 0; i < jsonArrayitems.size(); i++) { - V1KeyToPath.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject()); + V1KeyToPath.validateJsonElement(jsonArrayitems.get(i)); }; } } @@ -256,9 +251,9 @@ public void write(JsonWriter out, V1ConfigMapProjection value) throws IOExceptio @Override public V1ConfigMapProjection read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -285,3 +280,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapVolumeSource.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapVolumeSource.java index 45385fa74a..f120f34967 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapVolumeSource.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapVolumeSource.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1KeyToPath; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * 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. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ConfigMapVolumeSource { public static final String SERIALIZED_NAME_DEFAULT_MODE = "defaultMode"; @SerializedName(SERIALIZED_NAME_DEFAULT_MODE) @@ -60,7 +60,7 @@ public class V1ConfigMapVolumeSource { public static final String SERIALIZED_NAME_ITEMS = "items"; @SerializedName(SERIALIZED_NAME_ITEMS) - private List items; + private List items = new ArrayList<>(); public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) @@ -74,7 +74,6 @@ public V1ConfigMapVolumeSource() { } public V1ConfigMapVolumeSource defaultMode(Integer defaultMode) { - this.defaultMode = defaultMode; return this; } @@ -88,14 +87,12 @@ public Integer getDefaultMode() { return defaultMode; } - public void setDefaultMode(Integer defaultMode) { this.defaultMode = defaultMode; } public V1ConfigMapVolumeSource items(List items) { - this.items = items; return this; } @@ -117,20 +114,18 @@ public List getItems() { return items; } - public void setItems(List items) { this.items = items; } public V1ConfigMapVolumeSource name(String name) { - this.name = name; return this; } /** - * Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + * Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names * @return name **/ @jakarta.annotation.Nullable @@ -138,14 +133,12 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } public V1ConfigMapVolumeSource optional(Boolean optional) { - this.optional = optional; return this; } @@ -159,7 +152,6 @@ public Boolean getOptional() { return optional; } - public void setOptional(Boolean optional) { this.optional = optional; } @@ -226,25 +218,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ConfigMapVolumeSource + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ConfigMapVolumeSource */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ConfigMapVolumeSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ConfigMapVolumeSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ConfigMapVolumeSource is not found in the empty JSON string", V1ConfigMapVolumeSource.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ConfigMapVolumeSource.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ConfigMapVolumeSource` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ConfigMapVolumeSource` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (jsonObj.get("items") != null && !jsonObj.get("items").isJsonNull()) { JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); if (jsonArrayitems != null) { @@ -255,7 +248,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `items` (array) for (int i = 0; i < jsonArrayitems.size(); i++) { - V1KeyToPath.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject()); + V1KeyToPath.validateJsonElement(jsonArrayitems.get(i)); }; } } @@ -284,9 +277,9 @@ public void write(JsonWriter out, V1ConfigMapVolumeSource value) throws IOExcept @Override public V1ConfigMapVolumeSource read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -313,3 +306,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Container.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Container.java index 66ce722333..75f9991e1f 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Container.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Container.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -31,6 +31,7 @@ import io.kubernetes.client.openapi.models.V1VolumeMount; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -53,7 +54,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -61,23 +61,23 @@ /** * A single application container that you want to run within a pod. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1Container { public static final String SERIALIZED_NAME_ARGS = "args"; @SerializedName(SERIALIZED_NAME_ARGS) - private List args; + private List args = new ArrayList<>(); public static final String SERIALIZED_NAME_COMMAND = "command"; @SerializedName(SERIALIZED_NAME_COMMAND) - private List command; + private List command = new ArrayList<>(); public static final String SERIALIZED_NAME_ENV = "env"; @SerializedName(SERIALIZED_NAME_ENV) - private List env; + private List env = new ArrayList<>(); public static final String SERIALIZED_NAME_ENV_FROM = "envFrom"; @SerializedName(SERIALIZED_NAME_ENV_FROM) - private List envFrom; + private List envFrom = new ArrayList<>(); public static final String SERIALIZED_NAME_IMAGE = "image"; @SerializedName(SERIALIZED_NAME_IMAGE) @@ -101,7 +101,7 @@ public class V1Container { public static final String SERIALIZED_NAME_PORTS = "ports"; @SerializedName(SERIALIZED_NAME_PORTS) - private List ports; + private List ports = new ArrayList<>(); public static final String SERIALIZED_NAME_READINESS_PROBE = "readinessProbe"; @SerializedName(SERIALIZED_NAME_READINESS_PROBE) @@ -109,7 +109,7 @@ public class V1Container { public static final String SERIALIZED_NAME_RESIZE_POLICY = "resizePolicy"; @SerializedName(SERIALIZED_NAME_RESIZE_POLICY) - private List resizePolicy; + private List resizePolicy = new ArrayList<>(); public static final String SERIALIZED_NAME_RESOURCES = "resources"; @SerializedName(SERIALIZED_NAME_RESOURCES) @@ -149,11 +149,11 @@ public class V1Container { public static final String SERIALIZED_NAME_VOLUME_DEVICES = "volumeDevices"; @SerializedName(SERIALIZED_NAME_VOLUME_DEVICES) - private List volumeDevices; + private List volumeDevices = new ArrayList<>(); public static final String SERIALIZED_NAME_VOLUME_MOUNTS = "volumeMounts"; @SerializedName(SERIALIZED_NAME_VOLUME_MOUNTS) - private List volumeMounts; + private List volumeMounts = new ArrayList<>(); public static final String SERIALIZED_NAME_WORKING_DIR = "workingDir"; @SerializedName(SERIALIZED_NAME_WORKING_DIR) @@ -163,7 +163,6 @@ public V1Container() { } public V1Container args(List args) { - this.args = args; return this; } @@ -185,14 +184,12 @@ public List getArgs() { return args; } - public void setArgs(List args) { this.args = args; } public V1Container command(List command) { - this.command = command; return this; } @@ -214,14 +211,12 @@ public List getCommand() { return command; } - public void setCommand(List command) { this.command = command; } public V1Container env(List env) { - this.env = env; return this; } @@ -243,14 +238,12 @@ public List getEnv() { return env; } - public void setEnv(List env) { this.env = env; } public V1Container envFrom(List envFrom) { - this.envFrom = envFrom; return this; } @@ -272,14 +265,12 @@ public List getEnvFrom() { return envFrom; } - public void setEnvFrom(List envFrom) { this.envFrom = envFrom; } public V1Container image(String image) { - this.image = image; return this; } @@ -293,14 +284,12 @@ public String getImage() { return image; } - public void setImage(String image) { this.image = image; } public V1Container imagePullPolicy(String imagePullPolicy) { - this.imagePullPolicy = imagePullPolicy; return this; } @@ -314,14 +303,12 @@ public String getImagePullPolicy() { return imagePullPolicy; } - public void setImagePullPolicy(String imagePullPolicy) { this.imagePullPolicy = imagePullPolicy; } public V1Container lifecycle(V1Lifecycle lifecycle) { - this.lifecycle = lifecycle; return this; } @@ -335,14 +322,12 @@ public V1Lifecycle getLifecycle() { return lifecycle; } - public void setLifecycle(V1Lifecycle lifecycle) { this.lifecycle = lifecycle; } public V1Container livenessProbe(V1Probe livenessProbe) { - this.livenessProbe = livenessProbe; return this; } @@ -356,14 +341,12 @@ public V1Probe getLivenessProbe() { return livenessProbe; } - public void setLivenessProbe(V1Probe livenessProbe) { this.livenessProbe = livenessProbe; } public V1Container name(String name) { - this.name = name; return this; } @@ -377,14 +360,12 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } public V1Container ports(List ports) { - this.ports = ports; return this; } @@ -406,14 +387,12 @@ public List getPorts() { return ports; } - public void setPorts(List ports) { this.ports = ports; } public V1Container readinessProbe(V1Probe readinessProbe) { - this.readinessProbe = readinessProbe; return this; } @@ -427,14 +406,12 @@ public V1Probe getReadinessProbe() { return readinessProbe; } - public void setReadinessProbe(V1Probe readinessProbe) { this.readinessProbe = readinessProbe; } public V1Container resizePolicy(List resizePolicy) { - this.resizePolicy = resizePolicy; return this; } @@ -456,14 +433,12 @@ public List getResizePolicy() { return resizePolicy; } - public void setResizePolicy(List resizePolicy) { this.resizePolicy = resizePolicy; } public V1Container resources(V1ResourceRequirements resources) { - this.resources = resources; return this; } @@ -477,14 +452,12 @@ public V1ResourceRequirements getResources() { return resources; } - public void setResources(V1ResourceRequirements resources) { this.resources = resources; } public V1Container restartPolicy(String restartPolicy) { - this.restartPolicy = restartPolicy; return this; } @@ -498,14 +471,12 @@ public String getRestartPolicy() { return restartPolicy; } - public void setRestartPolicy(String restartPolicy) { this.restartPolicy = restartPolicy; } public V1Container securityContext(V1SecurityContext securityContext) { - this.securityContext = securityContext; return this; } @@ -519,14 +490,12 @@ public V1SecurityContext getSecurityContext() { return securityContext; } - public void setSecurityContext(V1SecurityContext securityContext) { this.securityContext = securityContext; } public V1Container startupProbe(V1Probe startupProbe) { - this.startupProbe = startupProbe; return this; } @@ -540,14 +509,12 @@ public V1Probe getStartupProbe() { return startupProbe; } - public void setStartupProbe(V1Probe startupProbe) { this.startupProbe = startupProbe; } public V1Container stdin(Boolean stdin) { - this.stdin = stdin; return this; } @@ -561,14 +528,12 @@ public Boolean getStdin() { return stdin; } - public void setStdin(Boolean stdin) { this.stdin = stdin; } public V1Container stdinOnce(Boolean stdinOnce) { - this.stdinOnce = stdinOnce; return this; } @@ -582,14 +547,12 @@ public Boolean getStdinOnce() { return stdinOnce; } - public void setStdinOnce(Boolean stdinOnce) { this.stdinOnce = stdinOnce; } public V1Container terminationMessagePath(String terminationMessagePath) { - this.terminationMessagePath = terminationMessagePath; return this; } @@ -603,14 +566,12 @@ public String getTerminationMessagePath() { return terminationMessagePath; } - public void setTerminationMessagePath(String terminationMessagePath) { this.terminationMessagePath = terminationMessagePath; } public V1Container terminationMessagePolicy(String terminationMessagePolicy) { - this.terminationMessagePolicy = terminationMessagePolicy; return this; } @@ -624,14 +585,12 @@ public String getTerminationMessagePolicy() { return terminationMessagePolicy; } - public void setTerminationMessagePolicy(String terminationMessagePolicy) { this.terminationMessagePolicy = terminationMessagePolicy; } public V1Container tty(Boolean tty) { - this.tty = tty; return this; } @@ -645,14 +604,12 @@ public Boolean getTty() { return tty; } - public void setTty(Boolean tty) { this.tty = tty; } public V1Container volumeDevices(List volumeDevices) { - this.volumeDevices = volumeDevices; return this; } @@ -674,14 +631,12 @@ public List getVolumeDevices() { return volumeDevices; } - public void setVolumeDevices(List volumeDevices) { this.volumeDevices = volumeDevices; } public V1Container volumeMounts(List volumeMounts) { - this.volumeMounts = volumeMounts; return this; } @@ -703,14 +658,12 @@ public List getVolumeMounts() { return volumeMounts; } - public void setVolumeMounts(List volumeMounts) { this.volumeMounts = volumeMounts; } public V1Container workingDir(String workingDir) { - this.workingDir = workingDir; return this; } @@ -724,7 +677,6 @@ public String getWorkingDir() { return workingDir; } - public void setWorkingDir(String workingDir) { this.workingDir = workingDir; } @@ -852,38 +804,39 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1Container + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1Container */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1Container.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1Container.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1Container is not found in the empty JSON string", V1Container.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1Container.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1Container` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1Container` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1Container.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the optional json data is an array if present - if (jsonObj.get("args") != null && !jsonObj.get("args").isJsonArray()) { + if (jsonObj.get("args") != null && !jsonObj.get("args").isJsonNull() && !jsonObj.get("args").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `args` to be an array in the JSON string but got `%s`", jsonObj.get("args").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("command") != null && !jsonObj.get("command").isJsonArray()) { + if (jsonObj.get("command") != null && !jsonObj.get("command").isJsonNull() && !jsonObj.get("command").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `command` to be an array in the JSON string but got `%s`", jsonObj.get("command").toString())); } if (jsonObj.get("env") != null && !jsonObj.get("env").isJsonNull()) { @@ -896,7 +849,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `env` (array) for (int i = 0; i < jsonArrayenv.size(); i++) { - V1EnvVar.validateJsonObject(jsonArrayenv.get(i).getAsJsonObject()); + V1EnvVar.validateJsonElement(jsonArrayenv.get(i)); }; } } @@ -910,7 +863,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `envFrom` (array) for (int i = 0; i < jsonArrayenvFrom.size(); i++) { - V1EnvFromSource.validateJsonObject(jsonArrayenvFrom.get(i).getAsJsonObject()); + V1EnvFromSource.validateJsonElement(jsonArrayenvFrom.get(i)); }; } } @@ -922,11 +875,11 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `lifecycle` if (jsonObj.get("lifecycle") != null && !jsonObj.get("lifecycle").isJsonNull()) { - V1Lifecycle.validateJsonObject(jsonObj.getAsJsonObject("lifecycle")); + V1Lifecycle.validateJsonElement(jsonObj.get("lifecycle")); } // validate the optional field `livenessProbe` if (jsonObj.get("livenessProbe") != null && !jsonObj.get("livenessProbe").isJsonNull()) { - V1Probe.validateJsonObject(jsonObj.getAsJsonObject("livenessProbe")); + V1Probe.validateJsonElement(jsonObj.get("livenessProbe")); } if (!jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); @@ -941,13 +894,13 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `ports` (array) for (int i = 0; i < jsonArrayports.size(); i++) { - V1ContainerPort.validateJsonObject(jsonArrayports.get(i).getAsJsonObject()); + V1ContainerPort.validateJsonElement(jsonArrayports.get(i)); }; } } // validate the optional field `readinessProbe` if (jsonObj.get("readinessProbe") != null && !jsonObj.get("readinessProbe").isJsonNull()) { - V1Probe.validateJsonObject(jsonObj.getAsJsonObject("readinessProbe")); + V1Probe.validateJsonElement(jsonObj.get("readinessProbe")); } if (jsonObj.get("resizePolicy") != null && !jsonObj.get("resizePolicy").isJsonNull()) { JsonArray jsonArrayresizePolicy = jsonObj.getAsJsonArray("resizePolicy"); @@ -959,24 +912,24 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `resizePolicy` (array) for (int i = 0; i < jsonArrayresizePolicy.size(); i++) { - V1ContainerResizePolicy.validateJsonObject(jsonArrayresizePolicy.get(i).getAsJsonObject()); + V1ContainerResizePolicy.validateJsonElement(jsonArrayresizePolicy.get(i)); }; } } // validate the optional field `resources` if (jsonObj.get("resources") != null && !jsonObj.get("resources").isJsonNull()) { - V1ResourceRequirements.validateJsonObject(jsonObj.getAsJsonObject("resources")); + V1ResourceRequirements.validateJsonElement(jsonObj.get("resources")); } if ((jsonObj.get("restartPolicy") != null && !jsonObj.get("restartPolicy").isJsonNull()) && !jsonObj.get("restartPolicy").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `restartPolicy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("restartPolicy").toString())); } // validate the optional field `securityContext` if (jsonObj.get("securityContext") != null && !jsonObj.get("securityContext").isJsonNull()) { - V1SecurityContext.validateJsonObject(jsonObj.getAsJsonObject("securityContext")); + V1SecurityContext.validateJsonElement(jsonObj.get("securityContext")); } // validate the optional field `startupProbe` if (jsonObj.get("startupProbe") != null && !jsonObj.get("startupProbe").isJsonNull()) { - V1Probe.validateJsonObject(jsonObj.getAsJsonObject("startupProbe")); + V1Probe.validateJsonElement(jsonObj.get("startupProbe")); } if ((jsonObj.get("terminationMessagePath") != null && !jsonObj.get("terminationMessagePath").isJsonNull()) && !jsonObj.get("terminationMessagePath").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `terminationMessagePath` to be a primitive type in the JSON string but got `%s`", jsonObj.get("terminationMessagePath").toString())); @@ -994,7 +947,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `volumeDevices` (array) for (int i = 0; i < jsonArrayvolumeDevices.size(); i++) { - V1VolumeDevice.validateJsonObject(jsonArrayvolumeDevices.get(i).getAsJsonObject()); + V1VolumeDevice.validateJsonElement(jsonArrayvolumeDevices.get(i)); }; } } @@ -1008,7 +961,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `volumeMounts` (array) for (int i = 0; i < jsonArrayvolumeMounts.size(); i++) { - V1VolumeMount.validateJsonObject(jsonArrayvolumeMounts.get(i).getAsJsonObject()); + V1VolumeMount.validateJsonElement(jsonArrayvolumeMounts.get(i)); }; } } @@ -1037,9 +990,9 @@ public void write(JsonWriter out, V1Container value) throws IOException { @Override public V1Container read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -1066,3 +1019,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ContainerImage.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ContainerImage.java index ee960248ad..e3e8a187ae 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ContainerImage.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ContainerImage.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -43,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -51,11 +51,11 @@ /** * Describe a container image */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ContainerImage { public static final String SERIALIZED_NAME_NAMES = "names"; @SerializedName(SERIALIZED_NAME_NAMES) - private List names; + private List names = new ArrayList<>(); public static final String SERIALIZED_NAME_SIZE_BYTES = "sizeBytes"; @SerializedName(SERIALIZED_NAME_SIZE_BYTES) @@ -65,7 +65,6 @@ public V1ContainerImage() { } public V1ContainerImage names(List names) { - this.names = names; return this; } @@ -87,14 +86,12 @@ public List getNames() { return names; } - public void setNames(List names) { this.names = names; } public V1ContainerImage sizeBytes(Long sizeBytes) { - this.sizeBytes = sizeBytes; return this; } @@ -108,7 +105,6 @@ public Long getSizeBytes() { return sizeBytes; } - public void setSizeBytes(Long sizeBytes) { this.sizeBytes = sizeBytes; } @@ -169,27 +165,28 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ContainerImage + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ContainerImage */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ContainerImage.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ContainerImage.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ContainerImage is not found in the empty JSON string", V1ContainerImage.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ContainerImage.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ContainerImage` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ContainerImage` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the optional json data is an array if present - if (jsonObj.get("names") != null && !jsonObj.get("names").isJsonArray()) { + if (jsonObj.get("names") != null && !jsonObj.get("names").isJsonNull() && !jsonObj.get("names").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `names` to be an array in the JSON string but got `%s`", jsonObj.get("names").toString())); } } @@ -214,9 +211,9 @@ public void write(JsonWriter out, V1ContainerImage value) throws IOException { @Override public V1ContainerImage read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -243,3 +240,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ContainerPort.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ContainerPort.java index 0f44478717..59060f2b55 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ContainerPort.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ContainerPort.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * ContainerPort represents a network port in a single container. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ContainerPort { public static final String SERIALIZED_NAME_CONTAINER_PORT = "containerPort"; @SerializedName(SERIALIZED_NAME_CONTAINER_PORT) @@ -75,7 +75,6 @@ public V1ContainerPort() { } public V1ContainerPort containerPort(Integer containerPort) { - this.containerPort = containerPort; return this; } @@ -89,14 +88,12 @@ public Integer getContainerPort() { return containerPort; } - public void setContainerPort(Integer containerPort) { this.containerPort = containerPort; } public V1ContainerPort hostIP(String hostIP) { - this.hostIP = hostIP; return this; } @@ -110,14 +107,12 @@ public String getHostIP() { return hostIP; } - public void setHostIP(String hostIP) { this.hostIP = hostIP; } public V1ContainerPort hostPort(Integer hostPort) { - this.hostPort = hostPort; return this; } @@ -131,14 +126,12 @@ public Integer getHostPort() { return hostPort; } - public void setHostPort(Integer hostPort) { this.hostPort = hostPort; } public V1ContainerPort name(String name) { - this.name = name; return this; } @@ -152,14 +145,12 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } public V1ContainerPort protocol(String protocol) { - this.protocol = protocol; return this; } @@ -173,7 +164,6 @@ public String getProtocol() { return protocol; } - public void setProtocol(String protocol) { this.protocol = protocol; } @@ -244,32 +234,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ContainerPort + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ContainerPort */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ContainerPort.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ContainerPort.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ContainerPort is not found in the empty JSON string", V1ContainerPort.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ContainerPort.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ContainerPort` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ContainerPort` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1ContainerPort.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("hostIP") != null && !jsonObj.get("hostIP").isJsonNull()) && !jsonObj.get("hostIP").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `hostIP` to be a primitive type in the JSON string but got `%s`", jsonObj.get("hostIP").toString())); } @@ -301,9 +292,9 @@ public void write(JsonWriter out, V1ContainerPort value) throws IOException { @Override public V1ContainerPort read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -330,3 +321,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ContainerResizePolicy.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ContainerResizePolicy.java index f16beec6b6..95fa3a4b50 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ContainerResizePolicy.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ContainerResizePolicy.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * ContainerResizePolicy represents resource resize policy for the container. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ContainerResizePolicy { public static final String SERIALIZED_NAME_RESOURCE_NAME = "resourceName"; @SerializedName(SERIALIZED_NAME_RESOURCE_NAME) @@ -63,7 +63,6 @@ public V1ContainerResizePolicy() { } public V1ContainerResizePolicy resourceName(String resourceName) { - this.resourceName = resourceName; return this; } @@ -77,14 +76,12 @@ public String getResourceName() { return resourceName; } - public void setResourceName(String resourceName) { this.resourceName = resourceName; } public V1ContainerResizePolicy restartPolicy(String restartPolicy) { - this.restartPolicy = restartPolicy; return this; } @@ -98,7 +95,6 @@ public String getRestartPolicy() { return restartPolicy; } - public void setRestartPolicy(String restartPolicy) { this.restartPolicy = restartPolicy; } @@ -161,32 +157,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ContainerResizePolicy + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ContainerResizePolicy */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ContainerResizePolicy.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ContainerResizePolicy.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ContainerResizePolicy is not found in the empty JSON string", V1ContainerResizePolicy.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ContainerResizePolicy.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ContainerResizePolicy` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ContainerResizePolicy` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1ContainerResizePolicy.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("resourceName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `resourceName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("resourceName").toString())); } @@ -215,9 +212,9 @@ public void write(JsonWriter out, V1ContainerResizePolicy value) throws IOExcept @Override public V1ContainerResizePolicy read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -244,3 +241,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ContainerState.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ContainerState.java index 155c51a6bd..21241fa8e0 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ContainerState.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ContainerState.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1ContainerStateTerminated; import io.kubernetes.client.openapi.models.V1ContainerStateWaiting; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * 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. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ContainerState { public static final String SERIALIZED_NAME_RUNNING = "running"; @SerializedName(SERIALIZED_NAME_RUNNING) @@ -70,7 +70,6 @@ public V1ContainerState() { } public V1ContainerState running(V1ContainerStateRunning running) { - this.running = running; return this; } @@ -84,14 +83,12 @@ public V1ContainerStateRunning getRunning() { return running; } - public void setRunning(V1ContainerStateRunning running) { this.running = running; } public V1ContainerState terminated(V1ContainerStateTerminated terminated) { - this.terminated = terminated; return this; } @@ -105,14 +102,12 @@ public V1ContainerStateTerminated getTerminated() { return terminated; } - public void setTerminated(V1ContainerStateTerminated terminated) { this.terminated = terminated; } public V1ContainerState waiting(V1ContainerStateWaiting waiting) { - this.waiting = waiting; return this; } @@ -126,7 +121,6 @@ public V1ContainerStateWaiting getWaiting() { return waiting; } - public void setWaiting(V1ContainerStateWaiting waiting) { this.waiting = waiting; } @@ -190,36 +184,37 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ContainerState + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ContainerState */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ContainerState.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ContainerState.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ContainerState is not found in the empty JSON string", V1ContainerState.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ContainerState.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ContainerState` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ContainerState` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `running` if (jsonObj.get("running") != null && !jsonObj.get("running").isJsonNull()) { - V1ContainerStateRunning.validateJsonObject(jsonObj.getAsJsonObject("running")); + V1ContainerStateRunning.validateJsonElement(jsonObj.get("running")); } // validate the optional field `terminated` if (jsonObj.get("terminated") != null && !jsonObj.get("terminated").isJsonNull()) { - V1ContainerStateTerminated.validateJsonObject(jsonObj.getAsJsonObject("terminated")); + V1ContainerStateTerminated.validateJsonElement(jsonObj.get("terminated")); } // validate the optional field `waiting` if (jsonObj.get("waiting") != null && !jsonObj.get("waiting").isJsonNull()) { - V1ContainerStateWaiting.validateJsonObject(jsonObj.getAsJsonObject("waiting")); + V1ContainerStateWaiting.validateJsonElement(jsonObj.get("waiting")); } } @@ -243,9 +238,9 @@ public void write(JsonWriter out, V1ContainerState value) throws IOException { @Override public V1ContainerState read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -272,3 +267,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ContainerStateRunning.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ContainerStateRunning.java index 935cd0d720..3f423b5a82 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ContainerStateRunning.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ContainerStateRunning.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * ContainerStateRunning is a running state of a container. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ContainerStateRunning { public static final String SERIALIZED_NAME_STARTED_AT = "startedAt"; @SerializedName(SERIALIZED_NAME_STARTED_AT) @@ -60,7 +60,6 @@ public V1ContainerStateRunning() { } public V1ContainerStateRunning startedAt(OffsetDateTime startedAt) { - this.startedAt = startedAt; return this; } @@ -74,7 +73,6 @@ public OffsetDateTime getStartedAt() { return startedAt; } - public void setStartedAt(OffsetDateTime startedAt) { this.startedAt = startedAt; } @@ -132,25 +130,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ContainerStateRunning + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ContainerStateRunning */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ContainerStateRunning.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ContainerStateRunning.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ContainerStateRunning is not found in the empty JSON string", V1ContainerStateRunning.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ContainerStateRunning.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ContainerStateRunning` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ContainerStateRunning` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -173,9 +172,9 @@ public void write(JsonWriter out, V1ContainerStateRunning value) throws IOExcept @Override public V1ContainerStateRunning read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -202,3 +201,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ContainerStateTerminated.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ContainerStateTerminated.java index 1c945ea6fa..2cf49c1b76 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ContainerStateTerminated.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ContainerStateTerminated.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * ContainerStateTerminated is a terminated state of a container. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ContainerStateTerminated { public static final String SERIALIZED_NAME_CONTAINER_I_D = "containerID"; @SerializedName(SERIALIZED_NAME_CONTAINER_I_D) @@ -84,7 +84,6 @@ public V1ContainerStateTerminated() { } public V1ContainerStateTerminated containerID(String containerID) { - this.containerID = containerID; return this; } @@ -98,14 +97,12 @@ public String getContainerID() { return containerID; } - public void setContainerID(String containerID) { this.containerID = containerID; } public V1ContainerStateTerminated exitCode(Integer exitCode) { - this.exitCode = exitCode; return this; } @@ -119,14 +116,12 @@ public Integer getExitCode() { return exitCode; } - public void setExitCode(Integer exitCode) { this.exitCode = exitCode; } public V1ContainerStateTerminated finishedAt(OffsetDateTime finishedAt) { - this.finishedAt = finishedAt; return this; } @@ -140,14 +135,12 @@ public OffsetDateTime getFinishedAt() { return finishedAt; } - public void setFinishedAt(OffsetDateTime finishedAt) { this.finishedAt = finishedAt; } public V1ContainerStateTerminated message(String message) { - this.message = message; return this; } @@ -161,14 +154,12 @@ public String getMessage() { return message; } - public void setMessage(String message) { this.message = message; } public V1ContainerStateTerminated reason(String reason) { - this.reason = reason; return this; } @@ -182,14 +173,12 @@ public String getReason() { return reason; } - public void setReason(String reason) { this.reason = reason; } public V1ContainerStateTerminated signal(Integer signal) { - this.signal = signal; return this; } @@ -203,14 +192,12 @@ public Integer getSignal() { return signal; } - public void setSignal(Integer signal) { this.signal = signal; } public V1ContainerStateTerminated startedAt(OffsetDateTime startedAt) { - this.startedAt = startedAt; return this; } @@ -224,7 +211,6 @@ public OffsetDateTime getStartedAt() { return startedAt; } - public void setStartedAt(OffsetDateTime startedAt) { this.startedAt = startedAt; } @@ -301,32 +287,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ContainerStateTerminated + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ContainerStateTerminated */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ContainerStateTerminated.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ContainerStateTerminated.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ContainerStateTerminated is not found in the empty JSON string", V1ContainerStateTerminated.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ContainerStateTerminated.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ContainerStateTerminated` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ContainerStateTerminated` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1ContainerStateTerminated.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("containerID") != null && !jsonObj.get("containerID").isJsonNull()) && !jsonObj.get("containerID").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `containerID` to be a primitive type in the JSON string but got `%s`", jsonObj.get("containerID").toString())); } @@ -358,9 +345,9 @@ public void write(JsonWriter out, V1ContainerStateTerminated value) throws IOExc @Override public V1ContainerStateTerminated read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -387,3 +374,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ContainerStateWaiting.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ContainerStateWaiting.java index 3c32899aed..11466460c8 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ContainerStateWaiting.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ContainerStateWaiting.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * ContainerStateWaiting is a waiting state of a container. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ContainerStateWaiting { public static final String SERIALIZED_NAME_MESSAGE = "message"; @SerializedName(SERIALIZED_NAME_MESSAGE) @@ -63,7 +63,6 @@ public V1ContainerStateWaiting() { } public V1ContainerStateWaiting message(String message) { - this.message = message; return this; } @@ -77,14 +76,12 @@ public String getMessage() { return message; } - public void setMessage(String message) { this.message = message; } public V1ContainerStateWaiting reason(String reason) { - this.reason = reason; return this; } @@ -98,7 +95,6 @@ public String getReason() { return reason; } - public void setReason(String reason) { this.reason = reason; } @@ -159,25 +155,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ContainerStateWaiting + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ContainerStateWaiting */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ContainerStateWaiting.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ContainerStateWaiting.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ContainerStateWaiting is not found in the empty JSON string", V1ContainerStateWaiting.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ContainerStateWaiting.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ContainerStateWaiting` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ContainerStateWaiting` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); } @@ -206,9 +203,9 @@ public void write(JsonWriter out, V1ContainerStateWaiting value) throws IOExcept @Override public V1ContainerStateWaiting read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -235,3 +232,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ContainerStatus.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ContainerStatus.java index 10e33fe46d..9a254defcf 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ContainerStatus.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ContainerStatus.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -25,6 +25,7 @@ import io.kubernetes.client.openapi.models.V1VolumeMountStatus; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -49,7 +50,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -57,7 +57,7 @@ /** * ContainerStatus contains details for the current status of this container. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ContainerStatus { public static final String SERIALIZED_NAME_ALLOCATED_RESOURCES = "allocatedResources"; @SerializedName(SERIALIZED_NAME_ALLOCATED_RESOURCES) @@ -105,13 +105,12 @@ public class V1ContainerStatus { public static final String SERIALIZED_NAME_VOLUME_MOUNTS = "volumeMounts"; @SerializedName(SERIALIZED_NAME_VOLUME_MOUNTS) - private List volumeMounts; + private List volumeMounts = new ArrayList<>(); public V1ContainerStatus() { } public V1ContainerStatus allocatedResources(Map allocatedResources) { - this.allocatedResources = allocatedResources; return this; } @@ -133,14 +132,12 @@ public Map getAllocatedResources() { return allocatedResources; } - public void setAllocatedResources(Map allocatedResources) { this.allocatedResources = allocatedResources; } public V1ContainerStatus containerID(String containerID) { - this.containerID = containerID; return this; } @@ -154,14 +151,12 @@ public String getContainerID() { return containerID; } - public void setContainerID(String containerID) { this.containerID = containerID; } public V1ContainerStatus image(String image) { - this.image = image; return this; } @@ -175,14 +170,12 @@ public String getImage() { return image; } - public void setImage(String image) { this.image = image; } public V1ContainerStatus imageID(String imageID) { - this.imageID = imageID; return this; } @@ -196,14 +189,12 @@ public String getImageID() { return imageID; } - public void setImageID(String imageID) { this.imageID = imageID; } public V1ContainerStatus lastState(V1ContainerState lastState) { - this.lastState = lastState; return this; } @@ -217,14 +208,12 @@ public V1ContainerState getLastState() { return lastState; } - public void setLastState(V1ContainerState lastState) { this.lastState = lastState; } public V1ContainerStatus name(String name) { - this.name = name; return this; } @@ -238,14 +227,12 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } public V1ContainerStatus ready(Boolean ready) { - this.ready = ready; return this; } @@ -259,14 +246,12 @@ public Boolean getReady() { return ready; } - public void setReady(Boolean ready) { this.ready = ready; } public V1ContainerStatus resources(V1ResourceRequirements resources) { - this.resources = resources; return this; } @@ -280,14 +265,12 @@ public V1ResourceRequirements getResources() { return resources; } - public void setResources(V1ResourceRequirements resources) { this.resources = resources; } public V1ContainerStatus restartCount(Integer restartCount) { - this.restartCount = restartCount; return this; } @@ -301,14 +284,12 @@ public Integer getRestartCount() { return restartCount; } - public void setRestartCount(Integer restartCount) { this.restartCount = restartCount; } public V1ContainerStatus started(Boolean started) { - this.started = started; return this; } @@ -322,14 +303,12 @@ public Boolean getStarted() { return started; } - public void setStarted(Boolean started) { this.started = started; } public V1ContainerStatus state(V1ContainerState state) { - this.state = state; return this; } @@ -343,14 +322,12 @@ public V1ContainerState getState() { return state; } - public void setState(V1ContainerState state) { this.state = state; } public V1ContainerStatus volumeMounts(List volumeMounts) { - this.volumeMounts = volumeMounts; return this; } @@ -372,7 +349,6 @@ public List getVolumeMounts() { return volumeMounts; } - public void setVolumeMounts(List volumeMounts) { this.volumeMounts = volumeMounts; } @@ -468,32 +444,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ContainerStatus + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ContainerStatus */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ContainerStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ContainerStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ContainerStatus is not found in the empty JSON string", V1ContainerStatus.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ContainerStatus.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ContainerStatus` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ContainerStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1ContainerStatus.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("containerID") != null && !jsonObj.get("containerID").isJsonNull()) && !jsonObj.get("containerID").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `containerID` to be a primitive type in the JSON string but got `%s`", jsonObj.get("containerID").toString())); } @@ -505,18 +482,18 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `lastState` if (jsonObj.get("lastState") != null && !jsonObj.get("lastState").isJsonNull()) { - V1ContainerState.validateJsonObject(jsonObj.getAsJsonObject("lastState")); + V1ContainerState.validateJsonElement(jsonObj.get("lastState")); } if (!jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } // validate the optional field `resources` if (jsonObj.get("resources") != null && !jsonObj.get("resources").isJsonNull()) { - V1ResourceRequirements.validateJsonObject(jsonObj.getAsJsonObject("resources")); + V1ResourceRequirements.validateJsonElement(jsonObj.get("resources")); } // validate the optional field `state` if (jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) { - V1ContainerState.validateJsonObject(jsonObj.getAsJsonObject("state")); + V1ContainerState.validateJsonElement(jsonObj.get("state")); } if (jsonObj.get("volumeMounts") != null && !jsonObj.get("volumeMounts").isJsonNull()) { JsonArray jsonArrayvolumeMounts = jsonObj.getAsJsonArray("volumeMounts"); @@ -528,7 +505,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `volumeMounts` (array) for (int i = 0; i < jsonArrayvolumeMounts.size(); i++) { - V1VolumeMountStatus.validateJsonObject(jsonArrayvolumeMounts.get(i).getAsJsonObject()); + V1VolumeMountStatus.validateJsonElement(jsonArrayvolumeMounts.get(i)); }; } } @@ -554,9 +531,9 @@ public void write(JsonWriter out, V1ContainerStatus value) throws IOException { @Override public V1ContainerStatus read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -583,3 +560,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ControllerRevision.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ControllerRevision.java index 3a5416a6f1..745eee925e 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ControllerRevision.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ControllerRevision.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.openapi.models.V1ObjectMeta; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * ControllerRevision implements an immutable snapshot of state data. Clients are responsible for serializing and deserializing the objects that contain their internal state. Once a ControllerRevision has been successfully created, it can not be updated. The API Server will fail validation of all requests that attempt to mutate the Data field. ControllerRevisions may, however, be deleted. Note that, due to its use by both the DaemonSet and StatefulSet controllers for update and rollback, this object is beta. However, it may be subject to name and representation changes in future releases, and clients should not depend on its stability. It is primarily for internal use by controllers. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ControllerRevision implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -76,7 +76,6 @@ public V1ControllerRevision() { } public V1ControllerRevision apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -90,14 +89,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1ControllerRevision data(Object data) { - this.data = data; return this; } @@ -111,14 +108,12 @@ public Object getData() { return data; } - public void setData(Object data) { this.data = data; } public V1ControllerRevision kind(String kind) { - this.kind = kind; return this; } @@ -132,14 +127,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1ControllerRevision metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -153,14 +146,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V1ControllerRevision revision(Long revision) { - this.revision = revision; return this; } @@ -174,7 +165,6 @@ public Long getRevision() { return revision; } - public void setRevision(Long revision) { this.revision = revision; } @@ -245,32 +235,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ControllerRevision + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ControllerRevision */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ControllerRevision.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ControllerRevision.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ControllerRevision is not found in the empty JSON string", V1ControllerRevision.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ControllerRevision.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ControllerRevision` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ControllerRevision` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1ControllerRevision.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -279,7 +270,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } } @@ -303,9 +294,9 @@ public void write(JsonWriter out, V1ControllerRevision value) throws IOException @Override public V1ControllerRevision read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -332,3 +323,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ControllerRevisionList.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ControllerRevisionList.java index d6febf834e..5935199e97 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ControllerRevisionList.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ControllerRevisionList.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1ListMeta; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * ControllerRevisionList is a resource containing a list of ControllerRevision objects. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ControllerRevisionList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -75,7 +75,6 @@ public V1ControllerRevisionList() { } public V1ControllerRevisionList apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -89,14 +88,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1ControllerRevisionList items(List items) { - this.items = items; return this; } @@ -118,14 +115,12 @@ public List getItems() { return items; } - public void setItems(List items) { this.items = items; } public V1ControllerRevisionList kind(String kind) { - this.kind = kind; return this; } @@ -139,14 +134,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1ControllerRevisionList metadata(V1ListMeta metadata) { - this.metadata = metadata; return this; } @@ -160,7 +153,6 @@ public V1ListMeta getMetadata() { return metadata; } - public void setMetadata(V1ListMeta metadata) { this.metadata = metadata; } @@ -228,32 +220,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ControllerRevisionList + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ControllerRevisionList */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ControllerRevisionList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ControllerRevisionList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ControllerRevisionList is not found in the empty JSON string", V1ControllerRevisionList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ControllerRevisionList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ControllerRevisionList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ControllerRevisionList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1ControllerRevisionList.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -265,14 +258,14 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); // validate the required field `items` (array) for (int i = 0; i < jsonArrayitems.size(); i++) { - V1ControllerRevision.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject()); + V1ControllerRevision.validateJsonElement(jsonArrayitems.get(i)); }; if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ListMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ListMeta.validateJsonElement(jsonObj.get("metadata")); } } @@ -296,9 +289,9 @@ public void write(JsonWriter out, V1ControllerRevisionList value) throws IOExcep @Override public V1ControllerRevisionList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -325,3 +318,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CronJob.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CronJob.java index 6bea857f8f..334764cdc1 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CronJob.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CronJob.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1CronJobStatus; import io.kubernetes.client.openapi.models.V1ObjectMeta; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * CronJob represents the configuration of a single cron job. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1CronJob implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -78,7 +78,6 @@ public V1CronJob() { } public V1CronJob apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -92,14 +91,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1CronJob kind(String kind) { - this.kind = kind; return this; } @@ -113,14 +110,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1CronJob metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -134,14 +129,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V1CronJob spec(V1CronJobSpec spec) { - this.spec = spec; return this; } @@ -155,14 +148,12 @@ public V1CronJobSpec getSpec() { return spec; } - public void setSpec(V1CronJobSpec spec) { this.spec = spec; } public V1CronJob status(V1CronJobStatus status) { - this.status = status; return this; } @@ -176,7 +167,6 @@ public V1CronJobStatus getStatus() { return status; } - public void setStatus(V1CronJobStatus status) { this.status = status; } @@ -246,25 +236,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1CronJob + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1CronJob */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1CronJob.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1CronJob.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1CronJob is not found in the empty JSON string", V1CronJob.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1CronJob.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1CronJob` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1CronJob` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -273,15 +264,15 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } // validate the optional field `spec` if (jsonObj.get("spec") != null && !jsonObj.get("spec").isJsonNull()) { - V1CronJobSpec.validateJsonObject(jsonObj.getAsJsonObject("spec")); + V1CronJobSpec.validateJsonElement(jsonObj.get("spec")); } // validate the optional field `status` if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { - V1CronJobStatus.validateJsonObject(jsonObj.getAsJsonObject("status")); + V1CronJobStatus.validateJsonElement(jsonObj.get("status")); } } @@ -305,9 +296,9 @@ public void write(JsonWriter out, V1CronJob value) throws IOException { @Override public V1CronJob read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -334,3 +325,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CronJobList.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CronJobList.java index 84ff19ff66..0347af6e51 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CronJobList.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CronJobList.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1ListMeta; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * CronJobList is a collection of cron jobs. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1CronJobList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -75,7 +75,6 @@ public V1CronJobList() { } public V1CronJobList apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -89,14 +88,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1CronJobList items(List items) { - this.items = items; return this; } @@ -118,14 +115,12 @@ public List getItems() { return items; } - public void setItems(List items) { this.items = items; } public V1CronJobList kind(String kind) { - this.kind = kind; return this; } @@ -139,14 +134,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1CronJobList metadata(V1ListMeta metadata) { - this.metadata = metadata; return this; } @@ -160,7 +153,6 @@ public V1ListMeta getMetadata() { return metadata; } - public void setMetadata(V1ListMeta metadata) { this.metadata = metadata; } @@ -228,32 +220,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1CronJobList + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1CronJobList */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1CronJobList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1CronJobList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1CronJobList is not found in the empty JSON string", V1CronJobList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1CronJobList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1CronJobList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1CronJobList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1CronJobList.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -265,14 +258,14 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); // validate the required field `items` (array) for (int i = 0; i < jsonArrayitems.size(); i++) { - V1CronJob.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject()); + V1CronJob.validateJsonElement(jsonArrayitems.get(i)); }; if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ListMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ListMeta.validateJsonElement(jsonObj.get("metadata")); } } @@ -296,9 +289,9 @@ public void write(JsonWriter out, V1CronJobList value) throws IOException { @Override public V1CronJobList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -325,3 +318,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CronJobSpec.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CronJobSpec.java index cb57d85f30..7e1aa1535c 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CronJobSpec.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CronJobSpec.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.openapi.models.V1JobTemplateSpec; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * CronJobSpec describes how the job execution will look like and when it will actually run. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1CronJobSpec { public static final String SERIALIZED_NAME_CONCURRENCY_POLICY = "concurrencyPolicy"; @SerializedName(SERIALIZED_NAME_CONCURRENCY_POLICY) @@ -88,7 +88,6 @@ public V1CronJobSpec() { } public V1CronJobSpec concurrencyPolicy(String concurrencyPolicy) { - this.concurrencyPolicy = concurrencyPolicy; return this; } @@ -102,14 +101,12 @@ public String getConcurrencyPolicy() { return concurrencyPolicy; } - public void setConcurrencyPolicy(String concurrencyPolicy) { this.concurrencyPolicy = concurrencyPolicy; } public V1CronJobSpec failedJobsHistoryLimit(Integer failedJobsHistoryLimit) { - this.failedJobsHistoryLimit = failedJobsHistoryLimit; return this; } @@ -123,14 +120,12 @@ public Integer getFailedJobsHistoryLimit() { return failedJobsHistoryLimit; } - public void setFailedJobsHistoryLimit(Integer failedJobsHistoryLimit) { this.failedJobsHistoryLimit = failedJobsHistoryLimit; } public V1CronJobSpec jobTemplate(V1JobTemplateSpec jobTemplate) { - this.jobTemplate = jobTemplate; return this; } @@ -144,14 +139,12 @@ public V1JobTemplateSpec getJobTemplate() { return jobTemplate; } - public void setJobTemplate(V1JobTemplateSpec jobTemplate) { this.jobTemplate = jobTemplate; } public V1CronJobSpec schedule(String schedule) { - this.schedule = schedule; return this; } @@ -165,14 +158,12 @@ public String getSchedule() { return schedule; } - public void setSchedule(String schedule) { this.schedule = schedule; } public V1CronJobSpec startingDeadlineSeconds(Long startingDeadlineSeconds) { - this.startingDeadlineSeconds = startingDeadlineSeconds; return this; } @@ -186,14 +177,12 @@ public Long getStartingDeadlineSeconds() { return startingDeadlineSeconds; } - public void setStartingDeadlineSeconds(Long startingDeadlineSeconds) { this.startingDeadlineSeconds = startingDeadlineSeconds; } public V1CronJobSpec successfulJobsHistoryLimit(Integer successfulJobsHistoryLimit) { - this.successfulJobsHistoryLimit = successfulJobsHistoryLimit; return this; } @@ -207,14 +196,12 @@ public Integer getSuccessfulJobsHistoryLimit() { return successfulJobsHistoryLimit; } - public void setSuccessfulJobsHistoryLimit(Integer successfulJobsHistoryLimit) { this.successfulJobsHistoryLimit = successfulJobsHistoryLimit; } public V1CronJobSpec suspend(Boolean suspend) { - this.suspend = suspend; return this; } @@ -228,14 +215,12 @@ public Boolean getSuspend() { return suspend; } - public void setSuspend(Boolean suspend) { this.suspend = suspend; } public V1CronJobSpec timeZone(String timeZone) { - this.timeZone = timeZone; return this; } @@ -249,7 +234,6 @@ public String getTimeZone() { return timeZone; } - public void setTimeZone(String timeZone) { this.timeZone = timeZone; } @@ -330,37 +314,38 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1CronJobSpec + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1CronJobSpec */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1CronJobSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1CronJobSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1CronJobSpec is not found in the empty JSON string", V1CronJobSpec.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1CronJobSpec.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1CronJobSpec` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1CronJobSpec` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1CronJobSpec.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("concurrencyPolicy") != null && !jsonObj.get("concurrencyPolicy").isJsonNull()) && !jsonObj.get("concurrencyPolicy").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `concurrencyPolicy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("concurrencyPolicy").toString())); } // validate the required field `jobTemplate` - V1JobTemplateSpec.validateJsonObject(jsonObj.getAsJsonObject("jobTemplate")); + V1JobTemplateSpec.validateJsonElement(jsonObj.get("jobTemplate")); if (!jsonObj.get("schedule").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `schedule` to be a primitive type in the JSON string but got `%s`", jsonObj.get("schedule").toString())); } @@ -389,9 +374,9 @@ public void write(JsonWriter out, V1CronJobSpec value) throws IOException { @Override public V1CronJobSpec read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -418,3 +403,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CronJobStatus.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CronJobStatus.java index 7683366255..f13a4fe766 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CronJobStatus.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CronJobStatus.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,11 +53,11 @@ /** * CronJobStatus represents the current state of a cron job. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1CronJobStatus { public static final String SERIALIZED_NAME_ACTIVE = "active"; @SerializedName(SERIALIZED_NAME_ACTIVE) - private List active; + private List active = new ArrayList<>(); public static final String SERIALIZED_NAME_LAST_SCHEDULE_TIME = "lastScheduleTime"; @SerializedName(SERIALIZED_NAME_LAST_SCHEDULE_TIME) @@ -71,7 +71,6 @@ public V1CronJobStatus() { } public V1CronJobStatus active(List active) { - this.active = active; return this; } @@ -93,14 +92,12 @@ public List getActive() { return active; } - public void setActive(List active) { this.active = active; } public V1CronJobStatus lastScheduleTime(OffsetDateTime lastScheduleTime) { - this.lastScheduleTime = lastScheduleTime; return this; } @@ -114,14 +111,12 @@ public OffsetDateTime getLastScheduleTime() { return lastScheduleTime; } - public void setLastScheduleTime(OffsetDateTime lastScheduleTime) { this.lastScheduleTime = lastScheduleTime; } public V1CronJobStatus lastSuccessfulTime(OffsetDateTime lastSuccessfulTime) { - this.lastSuccessfulTime = lastSuccessfulTime; return this; } @@ -135,7 +130,6 @@ public OffsetDateTime getLastSuccessfulTime() { return lastSuccessfulTime; } - public void setLastSuccessfulTime(OffsetDateTime lastSuccessfulTime) { this.lastSuccessfulTime = lastSuccessfulTime; } @@ -199,25 +193,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1CronJobStatus + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1CronJobStatus */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1CronJobStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1CronJobStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1CronJobStatus is not found in the empty JSON string", V1CronJobStatus.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1CronJobStatus.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1CronJobStatus` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1CronJobStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (jsonObj.get("active") != null && !jsonObj.get("active").isJsonNull()) { JsonArray jsonArrayactive = jsonObj.getAsJsonArray("active"); if (jsonArrayactive != null) { @@ -228,7 +223,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `active` (array) for (int i = 0; i < jsonArrayactive.size(); i++) { - V1ObjectReference.validateJsonObject(jsonArrayactive.get(i).getAsJsonObject()); + V1ObjectReference.validateJsonElement(jsonArrayactive.get(i)); }; } } @@ -254,9 +249,9 @@ public void write(JsonWriter out, V1CronJobStatus value) throws IOException { @Override public V1CronJobStatus read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -283,3 +278,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CrossVersionObjectReference.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CrossVersionObjectReference.java index 9351481f51..baafbd8695 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CrossVersionObjectReference.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CrossVersionObjectReference.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * CrossVersionObjectReference contains enough information to let you identify the referred resource. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1CrossVersionObjectReference { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -67,7 +67,6 @@ public V1CrossVersionObjectReference() { } public V1CrossVersionObjectReference apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -81,14 +80,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1CrossVersionObjectReference kind(String kind) { - this.kind = kind; return this; } @@ -102,14 +99,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1CrossVersionObjectReference name(String name) { - this.name = name; return this; } @@ -123,7 +118,6 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } @@ -189,32 +183,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1CrossVersionObjectReference + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1CrossVersionObjectReference */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1CrossVersionObjectReference.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1CrossVersionObjectReference.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1CrossVersionObjectReference is not found in the empty JSON string", V1CrossVersionObjectReference.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1CrossVersionObjectReference.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1CrossVersionObjectReference` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1CrossVersionObjectReference` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1CrossVersionObjectReference.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -246,9 +241,9 @@ public void write(JsonWriter out, V1CrossVersionObjectReference value) throws IO @Override public V1CrossVersionObjectReference read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -275,3 +270,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceColumnDefinition.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceColumnDefinition.java index 54591c207b..0614463101 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceColumnDefinition.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceColumnDefinition.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * CustomResourceColumnDefinition specifies a column for server side printing. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1CustomResourceColumnDefinition { public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) @@ -79,7 +79,6 @@ public V1CustomResourceColumnDefinition() { } public V1CustomResourceColumnDefinition description(String description) { - this.description = description; return this; } @@ -93,14 +92,12 @@ public String getDescription() { return description; } - public void setDescription(String description) { this.description = description; } public V1CustomResourceColumnDefinition format(String format) { - this.format = format; return this; } @@ -114,14 +111,12 @@ public String getFormat() { return format; } - public void setFormat(String format) { this.format = format; } public V1CustomResourceColumnDefinition jsonPath(String jsonPath) { - this.jsonPath = jsonPath; return this; } @@ -135,14 +130,12 @@ public String getJsonPath() { return jsonPath; } - public void setJsonPath(String jsonPath) { this.jsonPath = jsonPath; } public V1CustomResourceColumnDefinition name(String name) { - this.name = name; return this; } @@ -156,14 +149,12 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } public V1CustomResourceColumnDefinition priority(Integer priority) { - this.priority = priority; return this; } @@ -177,14 +168,12 @@ public Integer getPriority() { return priority; } - public void setPriority(Integer priority) { this.priority = priority; } public V1CustomResourceColumnDefinition type(String type) { - this.type = type; return this; } @@ -198,7 +187,6 @@ public String getType() { return type; } - public void setType(String type) { this.type = type; } @@ -274,32 +262,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1CustomResourceColumnDefinition + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1CustomResourceColumnDefinition */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1CustomResourceColumnDefinition.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1CustomResourceColumnDefinition.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1CustomResourceColumnDefinition is not found in the empty JSON string", V1CustomResourceColumnDefinition.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1CustomResourceColumnDefinition.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1CustomResourceColumnDefinition` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1CustomResourceColumnDefinition` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1CustomResourceColumnDefinition.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } @@ -337,9 +326,9 @@ public void write(JsonWriter out, V1CustomResourceColumnDefinition value) throws @Override public V1CustomResourceColumnDefinition read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -366,3 +355,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceConversion.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceConversion.java index e80fb1358b..d067844ba9 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceConversion.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceConversion.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.openapi.models.V1WebhookConversion; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * CustomResourceConversion describes how to convert different versions of a CR. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1CustomResourceConversion { public static final String SERIALIZED_NAME_STRATEGY = "strategy"; @SerializedName(SERIALIZED_NAME_STRATEGY) @@ -64,7 +64,6 @@ public V1CustomResourceConversion() { } public V1CustomResourceConversion strategy(String strategy) { - this.strategy = strategy; return this; } @@ -78,14 +77,12 @@ public String getStrategy() { return strategy; } - public void setStrategy(String strategy) { this.strategy = strategy; } public V1CustomResourceConversion webhook(V1WebhookConversion webhook) { - this.webhook = webhook; return this; } @@ -99,7 +96,6 @@ public V1WebhookConversion getWebhook() { return webhook; } - public void setWebhook(V1WebhookConversion webhook) { this.webhook = webhook; } @@ -161,38 +157,39 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1CustomResourceConversion + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1CustomResourceConversion */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1CustomResourceConversion.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1CustomResourceConversion.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1CustomResourceConversion is not found in the empty JSON string", V1CustomResourceConversion.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1CustomResourceConversion.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1CustomResourceConversion` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1CustomResourceConversion` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1CustomResourceConversion.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("strategy").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `strategy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("strategy").toString())); } // validate the optional field `webhook` if (jsonObj.get("webhook") != null && !jsonObj.get("webhook").isJsonNull()) { - V1WebhookConversion.validateJsonObject(jsonObj.getAsJsonObject("webhook")); + V1WebhookConversion.validateJsonElement(jsonObj.get("webhook")); } } @@ -216,9 +213,9 @@ public void write(JsonWriter out, V1CustomResourceConversion value) throws IOExc @Override public V1CustomResourceConversion read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -245,3 +242,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinition.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinition.java index 3359a252f4..0bc9e9ee52 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinition.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinition.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1CustomResourceDefinitionStatus; import io.kubernetes.client.openapi.models.V1ObjectMeta; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * CustomResourceDefinition represents a resource that should be exposed on the API server. Its name MUST be in the format <.spec.name>.<.spec.group>. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1CustomResourceDefinition implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -78,7 +78,6 @@ public V1CustomResourceDefinition() { } public V1CustomResourceDefinition apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -92,14 +91,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1CustomResourceDefinition kind(String kind) { - this.kind = kind; return this; } @@ -113,14 +110,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1CustomResourceDefinition metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -134,14 +129,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V1CustomResourceDefinition spec(V1CustomResourceDefinitionSpec spec) { - this.spec = spec; return this; } @@ -155,14 +148,12 @@ public V1CustomResourceDefinitionSpec getSpec() { return spec; } - public void setSpec(V1CustomResourceDefinitionSpec spec) { this.spec = spec; } public V1CustomResourceDefinition status(V1CustomResourceDefinitionStatus status) { - this.status = status; return this; } @@ -176,7 +167,6 @@ public V1CustomResourceDefinitionStatus getStatus() { return status; } - public void setStatus(V1CustomResourceDefinitionStatus status) { this.status = status; } @@ -247,32 +237,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1CustomResourceDefinition + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1CustomResourceDefinition */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1CustomResourceDefinition.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1CustomResourceDefinition.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1CustomResourceDefinition is not found in the empty JSON string", V1CustomResourceDefinition.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1CustomResourceDefinition.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1CustomResourceDefinition` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1CustomResourceDefinition` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1CustomResourceDefinition.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -281,13 +272,13 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } // validate the required field `spec` - V1CustomResourceDefinitionSpec.validateJsonObject(jsonObj.getAsJsonObject("spec")); + V1CustomResourceDefinitionSpec.validateJsonElement(jsonObj.get("spec")); // validate the optional field `status` if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { - V1CustomResourceDefinitionStatus.validateJsonObject(jsonObj.getAsJsonObject("status")); + V1CustomResourceDefinitionStatus.validateJsonElement(jsonObj.get("status")); } } @@ -311,9 +302,9 @@ public void write(JsonWriter out, V1CustomResourceDefinition value) throws IOExc @Override public V1CustomResourceDefinition read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -340,3 +331,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionCondition.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionCondition.java index c6d3453b70..67200ea656 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionCondition.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionCondition.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * CustomResourceDefinitionCondition contains details for the current condition of this pod. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1CustomResourceDefinitionCondition { public static final String SERIALIZED_NAME_LAST_TRANSITION_TIME = "lastTransitionTime"; @SerializedName(SERIALIZED_NAME_LAST_TRANSITION_TIME) @@ -76,7 +76,6 @@ public V1CustomResourceDefinitionCondition() { } public V1CustomResourceDefinitionCondition lastTransitionTime(OffsetDateTime lastTransitionTime) { - this.lastTransitionTime = lastTransitionTime; return this; } @@ -90,14 +89,12 @@ public OffsetDateTime getLastTransitionTime() { return lastTransitionTime; } - public void setLastTransitionTime(OffsetDateTime lastTransitionTime) { this.lastTransitionTime = lastTransitionTime; } public V1CustomResourceDefinitionCondition message(String message) { - this.message = message; return this; } @@ -111,14 +108,12 @@ public String getMessage() { return message; } - public void setMessage(String message) { this.message = message; } public V1CustomResourceDefinitionCondition reason(String reason) { - this.reason = reason; return this; } @@ -132,14 +127,12 @@ public String getReason() { return reason; } - public void setReason(String reason) { this.reason = reason; } public V1CustomResourceDefinitionCondition status(String status) { - this.status = status; return this; } @@ -153,14 +146,12 @@ public String getStatus() { return status; } - public void setStatus(String status) { this.status = status; } public V1CustomResourceDefinitionCondition type(String type) { - this.type = type; return this; } @@ -174,7 +165,6 @@ public String getType() { return type; } - public void setType(String type) { this.type = type; } @@ -246,32 +236,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1CustomResourceDefinitionCondition + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1CustomResourceDefinitionCondition */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1CustomResourceDefinitionCondition.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1CustomResourceDefinitionCondition.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1CustomResourceDefinitionCondition is not found in the empty JSON string", V1CustomResourceDefinitionCondition.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1CustomResourceDefinitionCondition.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1CustomResourceDefinitionCondition` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1CustomResourceDefinitionCondition` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1CustomResourceDefinitionCondition.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); } @@ -306,9 +297,9 @@ public void write(JsonWriter out, V1CustomResourceDefinitionCondition value) thr @Override public V1CustomResourceDefinitionCondition read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -335,3 +326,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionList.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionList.java index 2aedf8caef..eb6dc50de2 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionList.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionList.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1ListMeta; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * CustomResourceDefinitionList is a list of CustomResourceDefinition objects. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1CustomResourceDefinitionList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -75,7 +75,6 @@ public V1CustomResourceDefinitionList() { } public V1CustomResourceDefinitionList apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -89,14 +88,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1CustomResourceDefinitionList items(List items) { - this.items = items; return this; } @@ -118,14 +115,12 @@ public List getItems() { return items; } - public void setItems(List items) { this.items = items; } public V1CustomResourceDefinitionList kind(String kind) { - this.kind = kind; return this; } @@ -139,14 +134,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1CustomResourceDefinitionList metadata(V1ListMeta metadata) { - this.metadata = metadata; return this; } @@ -160,7 +153,6 @@ public V1ListMeta getMetadata() { return metadata; } - public void setMetadata(V1ListMeta metadata) { this.metadata = metadata; } @@ -228,32 +220,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1CustomResourceDefinitionList + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1CustomResourceDefinitionList */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1CustomResourceDefinitionList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1CustomResourceDefinitionList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1CustomResourceDefinitionList is not found in the empty JSON string", V1CustomResourceDefinitionList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1CustomResourceDefinitionList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1CustomResourceDefinitionList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1CustomResourceDefinitionList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1CustomResourceDefinitionList.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -265,14 +258,14 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); // validate the required field `items` (array) for (int i = 0; i < jsonArrayitems.size(); i++) { - V1CustomResourceDefinition.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject()); + V1CustomResourceDefinition.validateJsonElement(jsonArrayitems.get(i)); }; if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ListMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ListMeta.validateJsonElement(jsonObj.get("metadata")); } } @@ -296,9 +289,9 @@ public void write(JsonWriter out, V1CustomResourceDefinitionList value) throws I @Override public V1CustomResourceDefinitionList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -325,3 +318,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionNames.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionNames.java index 0dd316087a..aba9650cf5 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionNames.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionNames.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -43,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -51,11 +51,11 @@ /** * CustomResourceDefinitionNames indicates the names to serve this CustomResourceDefinition */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1CustomResourceDefinitionNames { public static final String SERIALIZED_NAME_CATEGORIES = "categories"; @SerializedName(SERIALIZED_NAME_CATEGORIES) - private List categories; + private List categories = new ArrayList<>(); public static final String SERIALIZED_NAME_KIND = "kind"; @SerializedName(SERIALIZED_NAME_KIND) @@ -71,7 +71,7 @@ public class V1CustomResourceDefinitionNames { public static final String SERIALIZED_NAME_SHORT_NAMES = "shortNames"; @SerializedName(SERIALIZED_NAME_SHORT_NAMES) - private List shortNames; + private List shortNames = new ArrayList<>(); public static final String SERIALIZED_NAME_SINGULAR = "singular"; @SerializedName(SERIALIZED_NAME_SINGULAR) @@ -81,7 +81,6 @@ public V1CustomResourceDefinitionNames() { } public V1CustomResourceDefinitionNames categories(List categories) { - this.categories = categories; return this; } @@ -103,14 +102,12 @@ public List getCategories() { return categories; } - public void setCategories(List categories) { this.categories = categories; } public V1CustomResourceDefinitionNames kind(String kind) { - this.kind = kind; return this; } @@ -124,14 +121,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1CustomResourceDefinitionNames listKind(String listKind) { - this.listKind = listKind; return this; } @@ -145,14 +140,12 @@ public String getListKind() { return listKind; } - public void setListKind(String listKind) { this.listKind = listKind; } public V1CustomResourceDefinitionNames plural(String plural) { - this.plural = plural; return this; } @@ -166,14 +159,12 @@ public String getPlural() { return plural; } - public void setPlural(String plural) { this.plural = plural; } public V1CustomResourceDefinitionNames shortNames(List shortNames) { - this.shortNames = shortNames; return this; } @@ -195,14 +186,12 @@ public List getShortNames() { return shortNames; } - public void setShortNames(List shortNames) { this.shortNames = shortNames; } public V1CustomResourceDefinitionNames singular(String singular) { - this.singular = singular; return this; } @@ -216,7 +205,6 @@ public String getSingular() { return singular; } - public void setSingular(String singular) { this.singular = singular; } @@ -291,34 +279,35 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1CustomResourceDefinitionNames + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1CustomResourceDefinitionNames */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1CustomResourceDefinitionNames.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1CustomResourceDefinitionNames.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1CustomResourceDefinitionNames is not found in the empty JSON string", V1CustomResourceDefinitionNames.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1CustomResourceDefinitionNames.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1CustomResourceDefinitionNames` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1CustomResourceDefinitionNames` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1CustomResourceDefinitionNames.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the optional json data is an array if present - if (jsonObj.get("categories") != null && !jsonObj.get("categories").isJsonArray()) { + if (jsonObj.get("categories") != null && !jsonObj.get("categories").isJsonNull() && !jsonObj.get("categories").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `categories` to be an array in the JSON string but got `%s`", jsonObj.get("categories").toString())); } if (!jsonObj.get("kind").isJsonPrimitive()) { @@ -331,7 +320,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("Expected the field `plural` to be a primitive type in the JSON string but got `%s`", jsonObj.get("plural").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("shortNames") != null && !jsonObj.get("shortNames").isJsonArray()) { + if (jsonObj.get("shortNames") != null && !jsonObj.get("shortNames").isJsonNull() && !jsonObj.get("shortNames").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `shortNames` to be an array in the JSON string but got `%s`", jsonObj.get("shortNames").toString())); } if ((jsonObj.get("singular") != null && !jsonObj.get("singular").isJsonNull()) && !jsonObj.get("singular").isJsonPrimitive()) { @@ -359,9 +348,9 @@ public void write(JsonWriter out, V1CustomResourceDefinitionNames value) throws @Override public V1CustomResourceDefinitionNames read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -388,3 +377,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionSpec.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionSpec.java index d5ea5bf1fd..8d4095b3db 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionSpec.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionSpec.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -24,6 +24,7 @@ import io.kubernetes.client.openapi.models.V1CustomResourceDefinitionVersion; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -46,7 +47,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -54,7 +54,7 @@ /** * CustomResourceDefinitionSpec describes how a user wants their resource to appear */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1CustomResourceDefinitionSpec { public static final String SERIALIZED_NAME_CONVERSION = "conversion"; @SerializedName(SERIALIZED_NAME_CONVERSION) @@ -84,7 +84,6 @@ public V1CustomResourceDefinitionSpec() { } public V1CustomResourceDefinitionSpec conversion(V1CustomResourceConversion conversion) { - this.conversion = conversion; return this; } @@ -98,14 +97,12 @@ public V1CustomResourceConversion getConversion() { return conversion; } - public void setConversion(V1CustomResourceConversion conversion) { this.conversion = conversion; } public V1CustomResourceDefinitionSpec group(String group) { - this.group = group; return this; } @@ -119,14 +116,12 @@ public String getGroup() { return group; } - public void setGroup(String group) { this.group = group; } public V1CustomResourceDefinitionSpec names(V1CustomResourceDefinitionNames names) { - this.names = names; return this; } @@ -140,14 +135,12 @@ public V1CustomResourceDefinitionNames getNames() { return names; } - public void setNames(V1CustomResourceDefinitionNames names) { this.names = names; } public V1CustomResourceDefinitionSpec preserveUnknownFields(Boolean preserveUnknownFields) { - this.preserveUnknownFields = preserveUnknownFields; return this; } @@ -161,14 +154,12 @@ public Boolean getPreserveUnknownFields() { return preserveUnknownFields; } - public void setPreserveUnknownFields(Boolean preserveUnknownFields) { this.preserveUnknownFields = preserveUnknownFields; } public V1CustomResourceDefinitionSpec scope(String scope) { - this.scope = scope; return this; } @@ -182,14 +173,12 @@ public String getScope() { return scope; } - public void setScope(String scope) { this.scope = scope; } public V1CustomResourceDefinitionSpec versions(List versions) { - this.versions = versions; return this; } @@ -211,7 +200,6 @@ public List getVersions() { return versions; } - public void setVersions(List versions) { this.versions = versions; } @@ -288,41 +276,42 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1CustomResourceDefinitionSpec + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1CustomResourceDefinitionSpec */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1CustomResourceDefinitionSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1CustomResourceDefinitionSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1CustomResourceDefinitionSpec is not found in the empty JSON string", V1CustomResourceDefinitionSpec.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1CustomResourceDefinitionSpec.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1CustomResourceDefinitionSpec` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1CustomResourceDefinitionSpec` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1CustomResourceDefinitionSpec.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `conversion` if (jsonObj.get("conversion") != null && !jsonObj.get("conversion").isJsonNull()) { - V1CustomResourceConversion.validateJsonObject(jsonObj.getAsJsonObject("conversion")); + V1CustomResourceConversion.validateJsonElement(jsonObj.get("conversion")); } if (!jsonObj.get("group").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `group` to be a primitive type in the JSON string but got `%s`", jsonObj.get("group").toString())); } // validate the required field `names` - V1CustomResourceDefinitionNames.validateJsonObject(jsonObj.getAsJsonObject("names")); + V1CustomResourceDefinitionNames.validateJsonElement(jsonObj.get("names")); if (!jsonObj.get("scope").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `scope` to be a primitive type in the JSON string but got `%s`", jsonObj.get("scope").toString())); } @@ -334,7 +323,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArrayversions = jsonObj.getAsJsonArray("versions"); // validate the required field `versions` (array) for (int i = 0; i < jsonArrayversions.size(); i++) { - V1CustomResourceDefinitionVersion.validateJsonObject(jsonArrayversions.get(i).getAsJsonObject()); + V1CustomResourceDefinitionVersion.validateJsonElement(jsonArrayversions.get(i)); }; } @@ -358,9 +347,9 @@ public void write(JsonWriter out, V1CustomResourceDefinitionSpec value) throws I @Override public V1CustomResourceDefinitionSpec read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -387,3 +376,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionStatus.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionStatus.java index 9ebea1968a..05fcbd40b9 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionStatus.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionStatus.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1CustomResourceDefinitionNames; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * CustomResourceDefinitionStatus indicates the state of the CustomResourceDefinition */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1CustomResourceDefinitionStatus { public static final String SERIALIZED_NAME_ACCEPTED_NAMES = "acceptedNames"; @SerializedName(SERIALIZED_NAME_ACCEPTED_NAMES) @@ -61,17 +61,16 @@ public class V1CustomResourceDefinitionStatus { public static final String SERIALIZED_NAME_CONDITIONS = "conditions"; @SerializedName(SERIALIZED_NAME_CONDITIONS) - private List conditions; + private List conditions = new ArrayList<>(); public static final String SERIALIZED_NAME_STORED_VERSIONS = "storedVersions"; @SerializedName(SERIALIZED_NAME_STORED_VERSIONS) - private List storedVersions; + private List storedVersions = new ArrayList<>(); public V1CustomResourceDefinitionStatus() { } public V1CustomResourceDefinitionStatus acceptedNames(V1CustomResourceDefinitionNames acceptedNames) { - this.acceptedNames = acceptedNames; return this; } @@ -85,14 +84,12 @@ public V1CustomResourceDefinitionNames getAcceptedNames() { return acceptedNames; } - public void setAcceptedNames(V1CustomResourceDefinitionNames acceptedNames) { this.acceptedNames = acceptedNames; } public V1CustomResourceDefinitionStatus conditions(List conditions) { - this.conditions = conditions; return this; } @@ -114,14 +111,12 @@ public List getConditions() { return conditions; } - public void setConditions(List conditions) { this.conditions = conditions; } public V1CustomResourceDefinitionStatus storedVersions(List storedVersions) { - this.storedVersions = storedVersions; return this; } @@ -143,7 +138,6 @@ public List getStoredVersions() { return storedVersions; } - public void setStoredVersions(List storedVersions) { this.storedVersions = storedVersions; } @@ -207,28 +201,29 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1CustomResourceDefinitionStatus + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1CustomResourceDefinitionStatus */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1CustomResourceDefinitionStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1CustomResourceDefinitionStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1CustomResourceDefinitionStatus is not found in the empty JSON string", V1CustomResourceDefinitionStatus.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1CustomResourceDefinitionStatus.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1CustomResourceDefinitionStatus` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1CustomResourceDefinitionStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `acceptedNames` if (jsonObj.get("acceptedNames") != null && !jsonObj.get("acceptedNames").isJsonNull()) { - V1CustomResourceDefinitionNames.validateJsonObject(jsonObj.getAsJsonObject("acceptedNames")); + V1CustomResourceDefinitionNames.validateJsonElement(jsonObj.get("acceptedNames")); } if (jsonObj.get("conditions") != null && !jsonObj.get("conditions").isJsonNull()) { JsonArray jsonArrayconditions = jsonObj.getAsJsonArray("conditions"); @@ -240,12 +235,12 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `conditions` (array) for (int i = 0; i < jsonArrayconditions.size(); i++) { - V1CustomResourceDefinitionCondition.validateJsonObject(jsonArrayconditions.get(i).getAsJsonObject()); + V1CustomResourceDefinitionCondition.validateJsonElement(jsonArrayconditions.get(i)); }; } } // ensure the optional json data is an array if present - if (jsonObj.get("storedVersions") != null && !jsonObj.get("storedVersions").isJsonArray()) { + if (jsonObj.get("storedVersions") != null && !jsonObj.get("storedVersions").isJsonNull() && !jsonObj.get("storedVersions").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `storedVersions` to be an array in the JSON string but got `%s`", jsonObj.get("storedVersions").toString())); } } @@ -270,9 +265,9 @@ public void write(JsonWriter out, V1CustomResourceDefinitionStatus value) throws @Override public V1CustomResourceDefinitionStatus read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -299,3 +294,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionVersion.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionVersion.java index 8ef8175e98..4923bcfd8d 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionVersion.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionVersion.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -25,6 +25,7 @@ import io.kubernetes.client.openapi.models.V1SelectableField; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -47,7 +48,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -55,11 +55,11 @@ /** * CustomResourceDefinitionVersion describes a version for CRD. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1CustomResourceDefinitionVersion { public static final String SERIALIZED_NAME_ADDITIONAL_PRINTER_COLUMNS = "additionalPrinterColumns"; @SerializedName(SERIALIZED_NAME_ADDITIONAL_PRINTER_COLUMNS) - private List additionalPrinterColumns; + private List additionalPrinterColumns = new ArrayList<>(); public static final String SERIALIZED_NAME_DEPRECATED = "deprecated"; @SerializedName(SERIALIZED_NAME_DEPRECATED) @@ -79,7 +79,7 @@ public class V1CustomResourceDefinitionVersion { public static final String SERIALIZED_NAME_SELECTABLE_FIELDS = "selectableFields"; @SerializedName(SERIALIZED_NAME_SELECTABLE_FIELDS) - private List selectableFields; + private List selectableFields = new ArrayList<>(); public static final String SERIALIZED_NAME_SERVED = "served"; @SerializedName(SERIALIZED_NAME_SERVED) @@ -97,7 +97,6 @@ public V1CustomResourceDefinitionVersion() { } public V1CustomResourceDefinitionVersion additionalPrinterColumns(List additionalPrinterColumns) { - this.additionalPrinterColumns = additionalPrinterColumns; return this; } @@ -119,14 +118,12 @@ public List getAdditionalPrinterColumns() { return additionalPrinterColumns; } - public void setAdditionalPrinterColumns(List additionalPrinterColumns) { this.additionalPrinterColumns = additionalPrinterColumns; } public V1CustomResourceDefinitionVersion deprecated(Boolean deprecated) { - this.deprecated = deprecated; return this; } @@ -140,14 +137,12 @@ public Boolean getDeprecated() { return deprecated; } - public void setDeprecated(Boolean deprecated) { this.deprecated = deprecated; } public V1CustomResourceDefinitionVersion deprecationWarning(String deprecationWarning) { - this.deprecationWarning = deprecationWarning; return this; } @@ -161,14 +156,12 @@ public String getDeprecationWarning() { return deprecationWarning; } - public void setDeprecationWarning(String deprecationWarning) { this.deprecationWarning = deprecationWarning; } public V1CustomResourceDefinitionVersion name(String name) { - this.name = name; return this; } @@ -182,14 +175,12 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } public V1CustomResourceDefinitionVersion schema(V1CustomResourceValidation schema) { - this.schema = schema; return this; } @@ -203,14 +194,12 @@ public V1CustomResourceValidation getSchema() { return schema; } - public void setSchema(V1CustomResourceValidation schema) { this.schema = schema; } public V1CustomResourceDefinitionVersion selectableFields(List selectableFields) { - this.selectableFields = selectableFields; return this; } @@ -232,14 +221,12 @@ public List getSelectableFields() { return selectableFields; } - public void setSelectableFields(List selectableFields) { this.selectableFields = selectableFields; } public V1CustomResourceDefinitionVersion served(Boolean served) { - this.served = served; return this; } @@ -253,14 +240,12 @@ public Boolean getServed() { return served; } - public void setServed(Boolean served) { this.served = served; } public V1CustomResourceDefinitionVersion storage(Boolean storage) { - this.storage = storage; return this; } @@ -274,14 +259,12 @@ public Boolean getStorage() { return storage; } - public void setStorage(Boolean storage) { this.storage = storage; } public V1CustomResourceDefinitionVersion subresources(V1CustomResourceSubresources subresources) { - this.subresources = subresources; return this; } @@ -295,7 +278,6 @@ public V1CustomResourceSubresources getSubresources() { return subresources; } - public void setSubresources(V1CustomResourceSubresources subresources) { this.subresources = subresources; } @@ -380,32 +362,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1CustomResourceDefinitionVersion + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1CustomResourceDefinitionVersion */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1CustomResourceDefinitionVersion.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1CustomResourceDefinitionVersion.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1CustomResourceDefinitionVersion is not found in the empty JSON string", V1CustomResourceDefinitionVersion.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1CustomResourceDefinitionVersion.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1CustomResourceDefinitionVersion` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1CustomResourceDefinitionVersion` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1CustomResourceDefinitionVersion.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (jsonObj.get("additionalPrinterColumns") != null && !jsonObj.get("additionalPrinterColumns").isJsonNull()) { JsonArray jsonArrayadditionalPrinterColumns = jsonObj.getAsJsonArray("additionalPrinterColumns"); if (jsonArrayadditionalPrinterColumns != null) { @@ -416,7 +399,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `additionalPrinterColumns` (array) for (int i = 0; i < jsonArrayadditionalPrinterColumns.size(); i++) { - V1CustomResourceColumnDefinition.validateJsonObject(jsonArrayadditionalPrinterColumns.get(i).getAsJsonObject()); + V1CustomResourceColumnDefinition.validateJsonElement(jsonArrayadditionalPrinterColumns.get(i)); }; } } @@ -428,7 +411,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `schema` if (jsonObj.get("schema") != null && !jsonObj.get("schema").isJsonNull()) { - V1CustomResourceValidation.validateJsonObject(jsonObj.getAsJsonObject("schema")); + V1CustomResourceValidation.validateJsonElement(jsonObj.get("schema")); } if (jsonObj.get("selectableFields") != null && !jsonObj.get("selectableFields").isJsonNull()) { JsonArray jsonArrayselectableFields = jsonObj.getAsJsonArray("selectableFields"); @@ -440,13 +423,13 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `selectableFields` (array) for (int i = 0; i < jsonArrayselectableFields.size(); i++) { - V1SelectableField.validateJsonObject(jsonArrayselectableFields.get(i).getAsJsonObject()); + V1SelectableField.validateJsonElement(jsonArrayselectableFields.get(i)); }; } } // validate the optional field `subresources` if (jsonObj.get("subresources") != null && !jsonObj.get("subresources").isJsonNull()) { - V1CustomResourceSubresources.validateJsonObject(jsonObj.getAsJsonObject("subresources")); + V1CustomResourceSubresources.validateJsonElement(jsonObj.get("subresources")); } } @@ -470,9 +453,9 @@ public void write(JsonWriter out, V1CustomResourceDefinitionVersion value) throw @Override public V1CustomResourceDefinitionVersion read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -499,3 +482,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceSubresourceScale.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceSubresourceScale.java index 090eed2f1f..f6feabd533 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceSubresourceScale.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceSubresourceScale.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * CustomResourceSubresourceScale defines how to serve the scale subresource for CustomResources. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1CustomResourceSubresourceScale { public static final String SERIALIZED_NAME_LABEL_SELECTOR_PATH = "labelSelectorPath"; @SerializedName(SERIALIZED_NAME_LABEL_SELECTOR_PATH) @@ -67,7 +67,6 @@ public V1CustomResourceSubresourceScale() { } public V1CustomResourceSubresourceScale labelSelectorPath(String labelSelectorPath) { - this.labelSelectorPath = labelSelectorPath; return this; } @@ -81,14 +80,12 @@ public String getLabelSelectorPath() { return labelSelectorPath; } - public void setLabelSelectorPath(String labelSelectorPath) { this.labelSelectorPath = labelSelectorPath; } public V1CustomResourceSubresourceScale specReplicasPath(String specReplicasPath) { - this.specReplicasPath = specReplicasPath; return this; } @@ -102,14 +99,12 @@ public String getSpecReplicasPath() { return specReplicasPath; } - public void setSpecReplicasPath(String specReplicasPath) { this.specReplicasPath = specReplicasPath; } public V1CustomResourceSubresourceScale statusReplicasPath(String statusReplicasPath) { - this.statusReplicasPath = statusReplicasPath; return this; } @@ -123,7 +118,6 @@ public String getStatusReplicasPath() { return statusReplicasPath; } - public void setStatusReplicasPath(String statusReplicasPath) { this.statusReplicasPath = statusReplicasPath; } @@ -189,32 +183,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1CustomResourceSubresourceScale + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1CustomResourceSubresourceScale */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1CustomResourceSubresourceScale.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1CustomResourceSubresourceScale.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1CustomResourceSubresourceScale is not found in the empty JSON string", V1CustomResourceSubresourceScale.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1CustomResourceSubresourceScale.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1CustomResourceSubresourceScale` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1CustomResourceSubresourceScale` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1CustomResourceSubresourceScale.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("labelSelectorPath") != null && !jsonObj.get("labelSelectorPath").isJsonNull()) && !jsonObj.get("labelSelectorPath").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `labelSelectorPath` to be a primitive type in the JSON string but got `%s`", jsonObj.get("labelSelectorPath").toString())); } @@ -246,9 +241,9 @@ public void write(JsonWriter out, V1CustomResourceSubresourceScale value) throws @Override public V1CustomResourceSubresourceScale read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -275,3 +270,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceSubresources.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceSubresources.java index 4a125e40f0..ddaf6f5d66 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceSubresources.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceSubresources.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.openapi.models.V1CustomResourceSubresourceScale; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * CustomResourceSubresources defines the status and scale subresources for CustomResources. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1CustomResourceSubresources { public static final String SERIALIZED_NAME_SCALE = "scale"; @SerializedName(SERIALIZED_NAME_SCALE) @@ -64,7 +64,6 @@ public V1CustomResourceSubresources() { } public V1CustomResourceSubresources scale(V1CustomResourceSubresourceScale scale) { - this.scale = scale; return this; } @@ -78,14 +77,12 @@ public V1CustomResourceSubresourceScale getScale() { return scale; } - public void setScale(V1CustomResourceSubresourceScale scale) { this.scale = scale; } public V1CustomResourceSubresources status(Object status) { - this.status = status; return this; } @@ -99,7 +96,6 @@ public Object getStatus() { return status; } - public void setStatus(Object status) { this.status = status; } @@ -160,28 +156,29 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1CustomResourceSubresources + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1CustomResourceSubresources */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1CustomResourceSubresources.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1CustomResourceSubresources.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1CustomResourceSubresources is not found in the empty JSON string", V1CustomResourceSubresources.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1CustomResourceSubresources.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1CustomResourceSubresources` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1CustomResourceSubresources` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `scale` if (jsonObj.get("scale") != null && !jsonObj.get("scale").isJsonNull()) { - V1CustomResourceSubresourceScale.validateJsonObject(jsonObj.getAsJsonObject("scale")); + V1CustomResourceSubresourceScale.validateJsonElement(jsonObj.get("scale")); } } @@ -205,9 +202,9 @@ public void write(JsonWriter out, V1CustomResourceSubresources value) throws IOE @Override public V1CustomResourceSubresources read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -234,3 +231,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceValidation.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceValidation.java index b103fe4bf9..642b9adc42 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceValidation.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceValidation.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.openapi.models.V1JSONSchemaProps; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * CustomResourceValidation is a list of validation methods for CustomResources. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1CustomResourceValidation { public static final String SERIALIZED_NAME_OPEN_A_P_I_V3_SCHEMA = "openAPIV3Schema"; @SerializedName(SERIALIZED_NAME_OPEN_A_P_I_V3_SCHEMA) @@ -60,7 +60,6 @@ public V1CustomResourceValidation() { } public V1CustomResourceValidation openAPIV3Schema(V1JSONSchemaProps openAPIV3Schema) { - this.openAPIV3Schema = openAPIV3Schema; return this; } @@ -74,7 +73,6 @@ public V1JSONSchemaProps getOpenAPIV3Schema() { return openAPIV3Schema; } - public void setOpenAPIV3Schema(V1JSONSchemaProps openAPIV3Schema) { this.openAPIV3Schema = openAPIV3Schema; } @@ -132,28 +130,29 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1CustomResourceValidation + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1CustomResourceValidation */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1CustomResourceValidation.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1CustomResourceValidation.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1CustomResourceValidation is not found in the empty JSON string", V1CustomResourceValidation.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1CustomResourceValidation.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1CustomResourceValidation` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1CustomResourceValidation` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `openAPIV3Schema` if (jsonObj.get("openAPIV3Schema") != null && !jsonObj.get("openAPIV3Schema").isJsonNull()) { - V1JSONSchemaProps.validateJsonObject(jsonObj.getAsJsonObject("openAPIV3Schema")); + V1JSONSchemaProps.validateJsonElement(jsonObj.get("openAPIV3Schema")); } } @@ -177,9 +176,9 @@ public void write(JsonWriter out, V1CustomResourceValidation value) throws IOExc @Override public V1CustomResourceValidation read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -206,3 +205,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1DaemonEndpoint.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1DaemonEndpoint.java index 473e2aace9..2d1b5e8499 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1DaemonEndpoint.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1DaemonEndpoint.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * DaemonEndpoint contains information about a single Daemon endpoint. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1DaemonEndpoint { public static final String SERIALIZED_NAME_PORT = "Port"; @SerializedName(SERIALIZED_NAME_PORT) @@ -59,7 +59,6 @@ public V1DaemonEndpoint() { } public V1DaemonEndpoint port(Integer port) { - this.port = port; return this; } @@ -73,7 +72,6 @@ public Integer getPort() { return port; } - public void setPort(Integer port) { this.port = port; } @@ -132,32 +130,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1DaemonEndpoint + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1DaemonEndpoint */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1DaemonEndpoint.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1DaemonEndpoint.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1DaemonEndpoint is not found in the empty JSON string", V1DaemonEndpoint.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1DaemonEndpoint.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1DaemonEndpoint` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1DaemonEndpoint` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1DaemonEndpoint.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -180,9 +179,9 @@ public void write(JsonWriter out, V1DaemonEndpoint value) throws IOException { @Override public V1DaemonEndpoint read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -209,3 +208,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSet.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSet.java index 107f97b9ed..483c009698 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSet.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSet.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1DaemonSetStatus; import io.kubernetes.client.openapi.models.V1ObjectMeta; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * DaemonSet represents the configuration of a daemon set. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1DaemonSet implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -78,7 +78,6 @@ public V1DaemonSet() { } public V1DaemonSet apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -92,14 +91,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1DaemonSet kind(String kind) { - this.kind = kind; return this; } @@ -113,14 +110,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1DaemonSet metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -134,14 +129,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V1DaemonSet spec(V1DaemonSetSpec spec) { - this.spec = spec; return this; } @@ -155,14 +148,12 @@ public V1DaemonSetSpec getSpec() { return spec; } - public void setSpec(V1DaemonSetSpec spec) { this.spec = spec; } public V1DaemonSet status(V1DaemonSetStatus status) { - this.status = status; return this; } @@ -176,7 +167,6 @@ public V1DaemonSetStatus getStatus() { return status; } - public void setStatus(V1DaemonSetStatus status) { this.status = status; } @@ -246,25 +236,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1DaemonSet + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1DaemonSet */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1DaemonSet.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1DaemonSet.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1DaemonSet is not found in the empty JSON string", V1DaemonSet.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1DaemonSet.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1DaemonSet` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1DaemonSet` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -273,15 +264,15 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } // validate the optional field `spec` if (jsonObj.get("spec") != null && !jsonObj.get("spec").isJsonNull()) { - V1DaemonSetSpec.validateJsonObject(jsonObj.getAsJsonObject("spec")); + V1DaemonSetSpec.validateJsonElement(jsonObj.get("spec")); } // validate the optional field `status` if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { - V1DaemonSetStatus.validateJsonObject(jsonObj.getAsJsonObject("status")); + V1DaemonSetStatus.validateJsonElement(jsonObj.get("status")); } } @@ -305,9 +296,9 @@ public void write(JsonWriter out, V1DaemonSet value) throws IOException { @Override public V1DaemonSet read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -334,3 +325,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetCondition.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetCondition.java index a6722abda5..70c7081e6d 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetCondition.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetCondition.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * DaemonSetCondition describes the state of a DaemonSet at a certain point. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1DaemonSetCondition { public static final String SERIALIZED_NAME_LAST_TRANSITION_TIME = "lastTransitionTime"; @SerializedName(SERIALIZED_NAME_LAST_TRANSITION_TIME) @@ -76,7 +76,6 @@ public V1DaemonSetCondition() { } public V1DaemonSetCondition lastTransitionTime(OffsetDateTime lastTransitionTime) { - this.lastTransitionTime = lastTransitionTime; return this; } @@ -90,14 +89,12 @@ public OffsetDateTime getLastTransitionTime() { return lastTransitionTime; } - public void setLastTransitionTime(OffsetDateTime lastTransitionTime) { this.lastTransitionTime = lastTransitionTime; } public V1DaemonSetCondition message(String message) { - this.message = message; return this; } @@ -111,14 +108,12 @@ public String getMessage() { return message; } - public void setMessage(String message) { this.message = message; } public V1DaemonSetCondition reason(String reason) { - this.reason = reason; return this; } @@ -132,14 +127,12 @@ public String getReason() { return reason; } - public void setReason(String reason) { this.reason = reason; } public V1DaemonSetCondition status(String status) { - this.status = status; return this; } @@ -153,14 +146,12 @@ public String getStatus() { return status; } - public void setStatus(String status) { this.status = status; } public V1DaemonSetCondition type(String type) { - this.type = type; return this; } @@ -174,7 +165,6 @@ public String getType() { return type; } - public void setType(String type) { this.type = type; } @@ -246,32 +236,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1DaemonSetCondition + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1DaemonSetCondition */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1DaemonSetCondition.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1DaemonSetCondition.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1DaemonSetCondition is not found in the empty JSON string", V1DaemonSetCondition.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1DaemonSetCondition.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1DaemonSetCondition` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1DaemonSetCondition` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1DaemonSetCondition.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); } @@ -306,9 +297,9 @@ public void write(JsonWriter out, V1DaemonSetCondition value) throws IOException @Override public V1DaemonSetCondition read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -335,3 +326,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetList.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetList.java index bdc5bd2491..6cddc6ec54 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetList.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetList.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1ListMeta; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * DaemonSetList is a collection of daemon sets. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1DaemonSetList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -75,7 +75,6 @@ public V1DaemonSetList() { } public V1DaemonSetList apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -89,14 +88,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1DaemonSetList items(List items) { - this.items = items; return this; } @@ -118,14 +115,12 @@ public List getItems() { return items; } - public void setItems(List items) { this.items = items; } public V1DaemonSetList kind(String kind) { - this.kind = kind; return this; } @@ -139,14 +134,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1DaemonSetList metadata(V1ListMeta metadata) { - this.metadata = metadata; return this; } @@ -160,7 +153,6 @@ public V1ListMeta getMetadata() { return metadata; } - public void setMetadata(V1ListMeta metadata) { this.metadata = metadata; } @@ -228,32 +220,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1DaemonSetList + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1DaemonSetList */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1DaemonSetList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1DaemonSetList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1DaemonSetList is not found in the empty JSON string", V1DaemonSetList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1DaemonSetList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1DaemonSetList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1DaemonSetList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1DaemonSetList.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -265,14 +258,14 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); // validate the required field `items` (array) for (int i = 0; i < jsonArrayitems.size(); i++) { - V1DaemonSet.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject()); + V1DaemonSet.validateJsonElement(jsonArrayitems.get(i)); }; if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ListMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ListMeta.validateJsonElement(jsonObj.get("metadata")); } } @@ -296,9 +289,9 @@ public void write(JsonWriter out, V1DaemonSetList value) throws IOException { @Override public V1DaemonSetList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -325,3 +318,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetSpec.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetSpec.java index a48669dcca..8075f21de1 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetSpec.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetSpec.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1LabelSelector; import io.kubernetes.client.openapi.models.V1PodTemplateSpec; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * DaemonSetSpec is the specification of a daemon set. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1DaemonSetSpec { public static final String SERIALIZED_NAME_MIN_READY_SECONDS = "minReadySeconds"; @SerializedName(SERIALIZED_NAME_MIN_READY_SECONDS) @@ -78,7 +78,6 @@ public V1DaemonSetSpec() { } public V1DaemonSetSpec minReadySeconds(Integer minReadySeconds) { - this.minReadySeconds = minReadySeconds; return this; } @@ -92,14 +91,12 @@ public Integer getMinReadySeconds() { return minReadySeconds; } - public void setMinReadySeconds(Integer minReadySeconds) { this.minReadySeconds = minReadySeconds; } public V1DaemonSetSpec revisionHistoryLimit(Integer revisionHistoryLimit) { - this.revisionHistoryLimit = revisionHistoryLimit; return this; } @@ -113,14 +110,12 @@ public Integer getRevisionHistoryLimit() { return revisionHistoryLimit; } - public void setRevisionHistoryLimit(Integer revisionHistoryLimit) { this.revisionHistoryLimit = revisionHistoryLimit; } public V1DaemonSetSpec selector(V1LabelSelector selector) { - this.selector = selector; return this; } @@ -134,14 +129,12 @@ public V1LabelSelector getSelector() { return selector; } - public void setSelector(V1LabelSelector selector) { this.selector = selector; } public V1DaemonSetSpec template(V1PodTemplateSpec template) { - this.template = template; return this; } @@ -155,14 +148,12 @@ public V1PodTemplateSpec getTemplate() { return template; } - public void setTemplate(V1PodTemplateSpec template) { this.template = template; } public V1DaemonSetSpec updateStrategy(V1DaemonSetUpdateStrategy updateStrategy) { - this.updateStrategy = updateStrategy; return this; } @@ -176,7 +167,6 @@ public V1DaemonSetUpdateStrategy getUpdateStrategy() { return updateStrategy; } - public void setUpdateStrategy(V1DaemonSetUpdateStrategy updateStrategy) { this.updateStrategy = updateStrategy; } @@ -248,39 +238,40 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1DaemonSetSpec + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1DaemonSetSpec */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1DaemonSetSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1DaemonSetSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1DaemonSetSpec is not found in the empty JSON string", V1DaemonSetSpec.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1DaemonSetSpec.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1DaemonSetSpec` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1DaemonSetSpec` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1DaemonSetSpec.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the required field `selector` - V1LabelSelector.validateJsonObject(jsonObj.getAsJsonObject("selector")); + V1LabelSelector.validateJsonElement(jsonObj.get("selector")); // validate the required field `template` - V1PodTemplateSpec.validateJsonObject(jsonObj.getAsJsonObject("template")); + V1PodTemplateSpec.validateJsonElement(jsonObj.get("template")); // validate the optional field `updateStrategy` if (jsonObj.get("updateStrategy") != null && !jsonObj.get("updateStrategy").isJsonNull()) { - V1DaemonSetUpdateStrategy.validateJsonObject(jsonObj.getAsJsonObject("updateStrategy")); + V1DaemonSetUpdateStrategy.validateJsonElement(jsonObj.get("updateStrategy")); } } @@ -304,9 +295,9 @@ public void write(JsonWriter out, V1DaemonSetSpec value) throws IOException { @Override public V1DaemonSetSpec read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -333,3 +324,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetStatus.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetStatus.java index 9dbf1a3255..e47c550645 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetStatus.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetStatus.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1DaemonSetCondition; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * DaemonSetStatus represents the current status of a daemon set. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1DaemonSetStatus { public static final String SERIALIZED_NAME_COLLISION_COUNT = "collisionCount"; @SerializedName(SERIALIZED_NAME_COLLISION_COUNT) @@ -60,7 +60,7 @@ public class V1DaemonSetStatus { public static final String SERIALIZED_NAME_CONDITIONS = "conditions"; @SerializedName(SERIALIZED_NAME_CONDITIONS) - private List conditions; + private List conditions = new ArrayList<>(); public static final String SERIALIZED_NAME_CURRENT_NUMBER_SCHEDULED = "currentNumberScheduled"; @SerializedName(SERIALIZED_NAME_CURRENT_NUMBER_SCHEDULED) @@ -98,7 +98,6 @@ public V1DaemonSetStatus() { } public V1DaemonSetStatus collisionCount(Integer collisionCount) { - this.collisionCount = collisionCount; return this; } @@ -112,14 +111,12 @@ public Integer getCollisionCount() { return collisionCount; } - public void setCollisionCount(Integer collisionCount) { this.collisionCount = collisionCount; } public V1DaemonSetStatus conditions(List conditions) { - this.conditions = conditions; return this; } @@ -141,14 +138,12 @@ public List getConditions() { return conditions; } - public void setConditions(List conditions) { this.conditions = conditions; } public V1DaemonSetStatus currentNumberScheduled(Integer currentNumberScheduled) { - this.currentNumberScheduled = currentNumberScheduled; return this; } @@ -162,14 +157,12 @@ public Integer getCurrentNumberScheduled() { return currentNumberScheduled; } - public void setCurrentNumberScheduled(Integer currentNumberScheduled) { this.currentNumberScheduled = currentNumberScheduled; } public V1DaemonSetStatus desiredNumberScheduled(Integer desiredNumberScheduled) { - this.desiredNumberScheduled = desiredNumberScheduled; return this; } @@ -183,14 +176,12 @@ public Integer getDesiredNumberScheduled() { return desiredNumberScheduled; } - public void setDesiredNumberScheduled(Integer desiredNumberScheduled) { this.desiredNumberScheduled = desiredNumberScheduled; } public V1DaemonSetStatus numberAvailable(Integer numberAvailable) { - this.numberAvailable = numberAvailable; return this; } @@ -204,14 +195,12 @@ public Integer getNumberAvailable() { return numberAvailable; } - public void setNumberAvailable(Integer numberAvailable) { this.numberAvailable = numberAvailable; } public V1DaemonSetStatus numberMisscheduled(Integer numberMisscheduled) { - this.numberMisscheduled = numberMisscheduled; return this; } @@ -225,14 +214,12 @@ public Integer getNumberMisscheduled() { return numberMisscheduled; } - public void setNumberMisscheduled(Integer numberMisscheduled) { this.numberMisscheduled = numberMisscheduled; } public V1DaemonSetStatus numberReady(Integer numberReady) { - this.numberReady = numberReady; return this; } @@ -246,14 +233,12 @@ public Integer getNumberReady() { return numberReady; } - public void setNumberReady(Integer numberReady) { this.numberReady = numberReady; } public V1DaemonSetStatus numberUnavailable(Integer numberUnavailable) { - this.numberUnavailable = numberUnavailable; return this; } @@ -267,14 +252,12 @@ public Integer getNumberUnavailable() { return numberUnavailable; } - public void setNumberUnavailable(Integer numberUnavailable) { this.numberUnavailable = numberUnavailable; } public V1DaemonSetStatus observedGeneration(Long observedGeneration) { - this.observedGeneration = observedGeneration; return this; } @@ -288,14 +271,12 @@ public Long getObservedGeneration() { return observedGeneration; } - public void setObservedGeneration(Long observedGeneration) { this.observedGeneration = observedGeneration; } public V1DaemonSetStatus updatedNumberScheduled(Integer updatedNumberScheduled) { - this.updatedNumberScheduled = updatedNumberScheduled; return this; } @@ -309,7 +290,6 @@ public Integer getUpdatedNumberScheduled() { return updatedNumberScheduled; } - public void setUpdatedNumberScheduled(Integer updatedNumberScheduled) { this.updatedNumberScheduled = updatedNumberScheduled; } @@ -398,32 +378,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1DaemonSetStatus + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1DaemonSetStatus */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1DaemonSetStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1DaemonSetStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1DaemonSetStatus is not found in the empty JSON string", V1DaemonSetStatus.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1DaemonSetStatus.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1DaemonSetStatus` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1DaemonSetStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1DaemonSetStatus.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (jsonObj.get("conditions") != null && !jsonObj.get("conditions").isJsonNull()) { JsonArray jsonArrayconditions = jsonObj.getAsJsonArray("conditions"); if (jsonArrayconditions != null) { @@ -434,7 +415,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `conditions` (array) for (int i = 0; i < jsonArrayconditions.size(); i++) { - V1DaemonSetCondition.validateJsonObject(jsonArrayconditions.get(i).getAsJsonObject()); + V1DaemonSetCondition.validateJsonElement(jsonArrayconditions.get(i)); }; } } @@ -460,9 +441,9 @@ public void write(JsonWriter out, V1DaemonSetStatus value) throws IOException { @Override public V1DaemonSetStatus read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -489,3 +470,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetUpdateStrategy.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetUpdateStrategy.java index 9f3d509d65..a7ee90908d 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetUpdateStrategy.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetUpdateStrategy.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.openapi.models.V1RollingUpdateDaemonSet; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * DaemonSetUpdateStrategy is a struct used to control the update strategy for a DaemonSet. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1DaemonSetUpdateStrategy { public static final String SERIALIZED_NAME_ROLLING_UPDATE = "rollingUpdate"; @SerializedName(SERIALIZED_NAME_ROLLING_UPDATE) @@ -64,7 +64,6 @@ public V1DaemonSetUpdateStrategy() { } public V1DaemonSetUpdateStrategy rollingUpdate(V1RollingUpdateDaemonSet rollingUpdate) { - this.rollingUpdate = rollingUpdate; return this; } @@ -78,14 +77,12 @@ public V1RollingUpdateDaemonSet getRollingUpdate() { return rollingUpdate; } - public void setRollingUpdate(V1RollingUpdateDaemonSet rollingUpdate) { this.rollingUpdate = rollingUpdate; } public V1DaemonSetUpdateStrategy type(String type) { - this.type = type; return this; } @@ -99,7 +96,6 @@ public String getType() { return type; } - public void setType(String type) { this.type = type; } @@ -160,28 +156,29 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1DaemonSetUpdateStrategy + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1DaemonSetUpdateStrategy */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1DaemonSetUpdateStrategy.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1DaemonSetUpdateStrategy.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1DaemonSetUpdateStrategy is not found in the empty JSON string", V1DaemonSetUpdateStrategy.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1DaemonSetUpdateStrategy.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1DaemonSetUpdateStrategy` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1DaemonSetUpdateStrategy` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `rollingUpdate` if (jsonObj.get("rollingUpdate") != null && !jsonObj.get("rollingUpdate").isJsonNull()) { - V1RollingUpdateDaemonSet.validateJsonObject(jsonObj.getAsJsonObject("rollingUpdate")); + V1RollingUpdateDaemonSet.validateJsonElement(jsonObj.get("rollingUpdate")); } if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); @@ -208,9 +205,9 @@ public void write(JsonWriter out, V1DaemonSetUpdateStrategy value) throws IOExce @Override public V1DaemonSetUpdateStrategy read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -237,3 +234,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1DeleteOptions.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1DeleteOptions.java index 4417cce93b..d78c36a93d 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1DeleteOptions.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1DeleteOptions.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1Preconditions; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * DeleteOptions may be provided when deleting an API object. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1DeleteOptions { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -60,7 +60,7 @@ public class V1DeleteOptions { public static final String SERIALIZED_NAME_DRY_RUN = "dryRun"; @SerializedName(SERIALIZED_NAME_DRY_RUN) - private List dryRun; + private List dryRun = new ArrayList<>(); public static final String SERIALIZED_NAME_GRACE_PERIOD_SECONDS = "gracePeriodSeconds"; @SerializedName(SERIALIZED_NAME_GRACE_PERIOD_SECONDS) @@ -86,7 +86,6 @@ public V1DeleteOptions() { } public V1DeleteOptions apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -100,14 +99,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1DeleteOptions dryRun(List dryRun) { - this.dryRun = dryRun; return this; } @@ -129,14 +126,12 @@ public List getDryRun() { return dryRun; } - public void setDryRun(List dryRun) { this.dryRun = dryRun; } public V1DeleteOptions gracePeriodSeconds(Long gracePeriodSeconds) { - this.gracePeriodSeconds = gracePeriodSeconds; return this; } @@ -150,14 +145,12 @@ public Long getGracePeriodSeconds() { return gracePeriodSeconds; } - public void setGracePeriodSeconds(Long gracePeriodSeconds) { this.gracePeriodSeconds = gracePeriodSeconds; } public V1DeleteOptions kind(String kind) { - this.kind = kind; return this; } @@ -171,14 +164,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1DeleteOptions orphanDependents(Boolean orphanDependents) { - this.orphanDependents = orphanDependents; return this; } @@ -192,14 +183,12 @@ public Boolean getOrphanDependents() { return orphanDependents; } - public void setOrphanDependents(Boolean orphanDependents) { this.orphanDependents = orphanDependents; } public V1DeleteOptions preconditions(V1Preconditions preconditions) { - this.preconditions = preconditions; return this; } @@ -213,14 +202,12 @@ public V1Preconditions getPreconditions() { return preconditions; } - public void setPreconditions(V1Preconditions preconditions) { this.preconditions = preconditions; } public V1DeleteOptions propagationPolicy(String propagationPolicy) { - this.propagationPolicy = propagationPolicy; return this; } @@ -234,7 +221,6 @@ public String getPropagationPolicy() { return propagationPolicy; } - public void setPropagationPolicy(String propagationPolicy) { this.propagationPolicy = propagationPolicy; } @@ -310,30 +296,31 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1DeleteOptions + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1DeleteOptions */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1DeleteOptions.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1DeleteOptions.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1DeleteOptions is not found in the empty JSON string", V1DeleteOptions.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1DeleteOptions.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1DeleteOptions` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1DeleteOptions` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("dryRun") != null && !jsonObj.get("dryRun").isJsonArray()) { + if (jsonObj.get("dryRun") != null && !jsonObj.get("dryRun").isJsonNull() && !jsonObj.get("dryRun").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `dryRun` to be an array in the JSON string but got `%s`", jsonObj.get("dryRun").toString())); } if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { @@ -341,7 +328,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `preconditions` if (jsonObj.get("preconditions") != null && !jsonObj.get("preconditions").isJsonNull()) { - V1Preconditions.validateJsonObject(jsonObj.getAsJsonObject("preconditions")); + V1Preconditions.validateJsonElement(jsonObj.get("preconditions")); } if ((jsonObj.get("propagationPolicy") != null && !jsonObj.get("propagationPolicy").isJsonNull()) && !jsonObj.get("propagationPolicy").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `propagationPolicy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("propagationPolicy").toString())); @@ -368,9 +355,9 @@ public void write(JsonWriter out, V1DeleteOptions value) throws IOException { @Override public V1DeleteOptions read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -397,3 +384,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Deployment.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Deployment.java index 27144d593a..93ea512d50 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Deployment.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Deployment.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1DeploymentStatus; import io.kubernetes.client.openapi.models.V1ObjectMeta; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * Deployment enables declarative updates for Pods and ReplicaSets. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1Deployment implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -78,7 +78,6 @@ public V1Deployment() { } public V1Deployment apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -92,14 +91,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1Deployment kind(String kind) { - this.kind = kind; return this; } @@ -113,14 +110,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1Deployment metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -134,14 +129,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V1Deployment spec(V1DeploymentSpec spec) { - this.spec = spec; return this; } @@ -155,14 +148,12 @@ public V1DeploymentSpec getSpec() { return spec; } - public void setSpec(V1DeploymentSpec spec) { this.spec = spec; } public V1Deployment status(V1DeploymentStatus status) { - this.status = status; return this; } @@ -176,7 +167,6 @@ public V1DeploymentStatus getStatus() { return status; } - public void setStatus(V1DeploymentStatus status) { this.status = status; } @@ -246,25 +236,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1Deployment + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1Deployment */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1Deployment.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1Deployment.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1Deployment is not found in the empty JSON string", V1Deployment.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1Deployment.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1Deployment` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1Deployment` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -273,15 +264,15 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } // validate the optional field `spec` if (jsonObj.get("spec") != null && !jsonObj.get("spec").isJsonNull()) { - V1DeploymentSpec.validateJsonObject(jsonObj.getAsJsonObject("spec")); + V1DeploymentSpec.validateJsonElement(jsonObj.get("spec")); } // validate the optional field `status` if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { - V1DeploymentStatus.validateJsonObject(jsonObj.getAsJsonObject("status")); + V1DeploymentStatus.validateJsonElement(jsonObj.get("status")); } } @@ -305,9 +296,9 @@ public void write(JsonWriter out, V1Deployment value) throws IOException { @Override public V1Deployment read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -334,3 +325,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentCondition.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentCondition.java index 3231a32be1..de272a31d9 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentCondition.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentCondition.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * DeploymentCondition describes the state of a deployment at a certain point. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1DeploymentCondition { public static final String SERIALIZED_NAME_LAST_TRANSITION_TIME = "lastTransitionTime"; @SerializedName(SERIALIZED_NAME_LAST_TRANSITION_TIME) @@ -80,7 +80,6 @@ public V1DeploymentCondition() { } public V1DeploymentCondition lastTransitionTime(OffsetDateTime lastTransitionTime) { - this.lastTransitionTime = lastTransitionTime; return this; } @@ -94,14 +93,12 @@ public OffsetDateTime getLastTransitionTime() { return lastTransitionTime; } - public void setLastTransitionTime(OffsetDateTime lastTransitionTime) { this.lastTransitionTime = lastTransitionTime; } public V1DeploymentCondition lastUpdateTime(OffsetDateTime lastUpdateTime) { - this.lastUpdateTime = lastUpdateTime; return this; } @@ -115,14 +112,12 @@ public OffsetDateTime getLastUpdateTime() { return lastUpdateTime; } - public void setLastUpdateTime(OffsetDateTime lastUpdateTime) { this.lastUpdateTime = lastUpdateTime; } public V1DeploymentCondition message(String message) { - this.message = message; return this; } @@ -136,14 +131,12 @@ public String getMessage() { return message; } - public void setMessage(String message) { this.message = message; } public V1DeploymentCondition reason(String reason) { - this.reason = reason; return this; } @@ -157,14 +150,12 @@ public String getReason() { return reason; } - public void setReason(String reason) { this.reason = reason; } public V1DeploymentCondition status(String status) { - this.status = status; return this; } @@ -178,14 +169,12 @@ public String getStatus() { return status; } - public void setStatus(String status) { this.status = status; } public V1DeploymentCondition type(String type) { - this.type = type; return this; } @@ -199,7 +188,6 @@ public String getType() { return type; } - public void setType(String type) { this.type = type; } @@ -274,32 +262,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1DeploymentCondition + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1DeploymentCondition */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1DeploymentCondition.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1DeploymentCondition.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1DeploymentCondition is not found in the empty JSON string", V1DeploymentCondition.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1DeploymentCondition.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1DeploymentCondition` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1DeploymentCondition` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1DeploymentCondition.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); } @@ -334,9 +323,9 @@ public void write(JsonWriter out, V1DeploymentCondition value) throws IOExceptio @Override public V1DeploymentCondition read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -363,3 +352,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentList.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentList.java index fd7007cdc4..6d22c9e7bd 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentList.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentList.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1ListMeta; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * DeploymentList is a list of Deployments. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1DeploymentList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -75,7 +75,6 @@ public V1DeploymentList() { } public V1DeploymentList apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -89,14 +88,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1DeploymentList items(List items) { - this.items = items; return this; } @@ -118,14 +115,12 @@ public List getItems() { return items; } - public void setItems(List items) { this.items = items; } public V1DeploymentList kind(String kind) { - this.kind = kind; return this; } @@ -139,14 +134,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1DeploymentList metadata(V1ListMeta metadata) { - this.metadata = metadata; return this; } @@ -160,7 +153,6 @@ public V1ListMeta getMetadata() { return metadata; } - public void setMetadata(V1ListMeta metadata) { this.metadata = metadata; } @@ -228,32 +220,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1DeploymentList + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1DeploymentList */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1DeploymentList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1DeploymentList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1DeploymentList is not found in the empty JSON string", V1DeploymentList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1DeploymentList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1DeploymentList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1DeploymentList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1DeploymentList.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -265,14 +258,14 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); // validate the required field `items` (array) for (int i = 0; i < jsonArrayitems.size(); i++) { - V1Deployment.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject()); + V1Deployment.validateJsonElement(jsonArrayitems.get(i)); }; if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ListMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ListMeta.validateJsonElement(jsonObj.get("metadata")); } } @@ -296,9 +289,9 @@ public void write(JsonWriter out, V1DeploymentList value) throws IOException { @Override public V1DeploymentList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -325,3 +318,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentSpec.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentSpec.java index 5a74fa349d..b62d218fea 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentSpec.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentSpec.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1LabelSelector; import io.kubernetes.client.openapi.models.V1PodTemplateSpec; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * DeploymentSpec is the specification of the desired behavior of the Deployment. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1DeploymentSpec { public static final String SERIALIZED_NAME_MIN_READY_SECONDS = "minReadySeconds"; @SerializedName(SERIALIZED_NAME_MIN_READY_SECONDS) @@ -90,7 +90,6 @@ public V1DeploymentSpec() { } public V1DeploymentSpec minReadySeconds(Integer minReadySeconds) { - this.minReadySeconds = minReadySeconds; return this; } @@ -104,14 +103,12 @@ public Integer getMinReadySeconds() { return minReadySeconds; } - public void setMinReadySeconds(Integer minReadySeconds) { this.minReadySeconds = minReadySeconds; } public V1DeploymentSpec paused(Boolean paused) { - this.paused = paused; return this; } @@ -125,14 +122,12 @@ public Boolean getPaused() { return paused; } - public void setPaused(Boolean paused) { this.paused = paused; } public V1DeploymentSpec progressDeadlineSeconds(Integer progressDeadlineSeconds) { - this.progressDeadlineSeconds = progressDeadlineSeconds; return this; } @@ -146,14 +141,12 @@ public Integer getProgressDeadlineSeconds() { return progressDeadlineSeconds; } - public void setProgressDeadlineSeconds(Integer progressDeadlineSeconds) { this.progressDeadlineSeconds = progressDeadlineSeconds; } public V1DeploymentSpec replicas(Integer replicas) { - this.replicas = replicas; return this; } @@ -167,14 +160,12 @@ public Integer getReplicas() { return replicas; } - public void setReplicas(Integer replicas) { this.replicas = replicas; } public V1DeploymentSpec revisionHistoryLimit(Integer revisionHistoryLimit) { - this.revisionHistoryLimit = revisionHistoryLimit; return this; } @@ -188,14 +179,12 @@ public Integer getRevisionHistoryLimit() { return revisionHistoryLimit; } - public void setRevisionHistoryLimit(Integer revisionHistoryLimit) { this.revisionHistoryLimit = revisionHistoryLimit; } public V1DeploymentSpec selector(V1LabelSelector selector) { - this.selector = selector; return this; } @@ -209,14 +198,12 @@ public V1LabelSelector getSelector() { return selector; } - public void setSelector(V1LabelSelector selector) { this.selector = selector; } public V1DeploymentSpec strategy(V1DeploymentStrategy strategy) { - this.strategy = strategy; return this; } @@ -230,14 +217,12 @@ public V1DeploymentStrategy getStrategy() { return strategy; } - public void setStrategy(V1DeploymentStrategy strategy) { this.strategy = strategy; } public V1DeploymentSpec template(V1PodTemplateSpec template) { - this.template = template; return this; } @@ -251,7 +236,6 @@ public V1PodTemplateSpec getTemplate() { return template; } - public void setTemplate(V1PodTemplateSpec template) { this.template = template; } @@ -332,40 +316,41 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1DeploymentSpec + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1DeploymentSpec */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1DeploymentSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1DeploymentSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1DeploymentSpec is not found in the empty JSON string", V1DeploymentSpec.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1DeploymentSpec.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1DeploymentSpec` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1DeploymentSpec` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1DeploymentSpec.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the required field `selector` - V1LabelSelector.validateJsonObject(jsonObj.getAsJsonObject("selector")); + V1LabelSelector.validateJsonElement(jsonObj.get("selector")); // validate the optional field `strategy` if (jsonObj.get("strategy") != null && !jsonObj.get("strategy").isJsonNull()) { - V1DeploymentStrategy.validateJsonObject(jsonObj.getAsJsonObject("strategy")); + V1DeploymentStrategy.validateJsonElement(jsonObj.get("strategy")); } // validate the required field `template` - V1PodTemplateSpec.validateJsonObject(jsonObj.getAsJsonObject("template")); + V1PodTemplateSpec.validateJsonElement(jsonObj.get("template")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -388,9 +373,9 @@ public void write(JsonWriter out, V1DeploymentSpec value) throws IOException { @Override public V1DeploymentSpec read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -417,3 +402,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentStatus.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentStatus.java index 13ade612dd..90ff16019e 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentStatus.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentStatus.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1DeploymentCondition; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * DeploymentStatus is the most recently observed status of the Deployment. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1DeploymentStatus { public static final String SERIALIZED_NAME_AVAILABLE_REPLICAS = "availableReplicas"; @SerializedName(SERIALIZED_NAME_AVAILABLE_REPLICAS) @@ -64,7 +64,7 @@ public class V1DeploymentStatus { public static final String SERIALIZED_NAME_CONDITIONS = "conditions"; @SerializedName(SERIALIZED_NAME_CONDITIONS) - private List conditions; + private List conditions = new ArrayList<>(); public static final String SERIALIZED_NAME_OBSERVED_GENERATION = "observedGeneration"; @SerializedName(SERIALIZED_NAME_OBSERVED_GENERATION) @@ -90,7 +90,6 @@ public V1DeploymentStatus() { } public V1DeploymentStatus availableReplicas(Integer availableReplicas) { - this.availableReplicas = availableReplicas; return this; } @@ -104,14 +103,12 @@ public Integer getAvailableReplicas() { return availableReplicas; } - public void setAvailableReplicas(Integer availableReplicas) { this.availableReplicas = availableReplicas; } public V1DeploymentStatus collisionCount(Integer collisionCount) { - this.collisionCount = collisionCount; return this; } @@ -125,14 +122,12 @@ public Integer getCollisionCount() { return collisionCount; } - public void setCollisionCount(Integer collisionCount) { this.collisionCount = collisionCount; } public V1DeploymentStatus conditions(List conditions) { - this.conditions = conditions; return this; } @@ -154,14 +149,12 @@ public List getConditions() { return conditions; } - public void setConditions(List conditions) { this.conditions = conditions; } public V1DeploymentStatus observedGeneration(Long observedGeneration) { - this.observedGeneration = observedGeneration; return this; } @@ -175,14 +168,12 @@ public Long getObservedGeneration() { return observedGeneration; } - public void setObservedGeneration(Long observedGeneration) { this.observedGeneration = observedGeneration; } public V1DeploymentStatus readyReplicas(Integer readyReplicas) { - this.readyReplicas = readyReplicas; return this; } @@ -196,14 +187,12 @@ public Integer getReadyReplicas() { return readyReplicas; } - public void setReadyReplicas(Integer readyReplicas) { this.readyReplicas = readyReplicas; } public V1DeploymentStatus replicas(Integer replicas) { - this.replicas = replicas; return this; } @@ -217,14 +206,12 @@ public Integer getReplicas() { return replicas; } - public void setReplicas(Integer replicas) { this.replicas = replicas; } public V1DeploymentStatus unavailableReplicas(Integer unavailableReplicas) { - this.unavailableReplicas = unavailableReplicas; return this; } @@ -238,14 +225,12 @@ public Integer getUnavailableReplicas() { return unavailableReplicas; } - public void setUnavailableReplicas(Integer unavailableReplicas) { this.unavailableReplicas = unavailableReplicas; } public V1DeploymentStatus updatedReplicas(Integer updatedReplicas) { - this.updatedReplicas = updatedReplicas; return this; } @@ -259,7 +244,6 @@ public Integer getUpdatedReplicas() { return updatedReplicas; } - public void setUpdatedReplicas(Integer updatedReplicas) { this.updatedReplicas = updatedReplicas; } @@ -338,25 +322,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1DeploymentStatus + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1DeploymentStatus */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1DeploymentStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1DeploymentStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1DeploymentStatus is not found in the empty JSON string", V1DeploymentStatus.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1DeploymentStatus.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1DeploymentStatus` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1DeploymentStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (jsonObj.get("conditions") != null && !jsonObj.get("conditions").isJsonNull()) { JsonArray jsonArrayconditions = jsonObj.getAsJsonArray("conditions"); if (jsonArrayconditions != null) { @@ -367,7 +352,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `conditions` (array) for (int i = 0; i < jsonArrayconditions.size(); i++) { - V1DeploymentCondition.validateJsonObject(jsonArrayconditions.get(i).getAsJsonObject()); + V1DeploymentCondition.validateJsonElement(jsonArrayconditions.get(i)); }; } } @@ -393,9 +378,9 @@ public void write(JsonWriter out, V1DeploymentStatus value) throws IOException { @Override public V1DeploymentStatus read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -422,3 +407,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentStrategy.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentStrategy.java index 43d1cefe55..dbf36f24ea 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentStrategy.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentStrategy.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.openapi.models.V1RollingUpdateDeployment; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * DeploymentStrategy describes how to replace existing pods with new ones. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1DeploymentStrategy { public static final String SERIALIZED_NAME_ROLLING_UPDATE = "rollingUpdate"; @SerializedName(SERIALIZED_NAME_ROLLING_UPDATE) @@ -64,7 +64,6 @@ public V1DeploymentStrategy() { } public V1DeploymentStrategy rollingUpdate(V1RollingUpdateDeployment rollingUpdate) { - this.rollingUpdate = rollingUpdate; return this; } @@ -78,14 +77,12 @@ public V1RollingUpdateDeployment getRollingUpdate() { return rollingUpdate; } - public void setRollingUpdate(V1RollingUpdateDeployment rollingUpdate) { this.rollingUpdate = rollingUpdate; } public V1DeploymentStrategy type(String type) { - this.type = type; return this; } @@ -99,7 +96,6 @@ public String getType() { return type; } - public void setType(String type) { this.type = type; } @@ -160,28 +156,29 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1DeploymentStrategy + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1DeploymentStrategy */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1DeploymentStrategy.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1DeploymentStrategy.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1DeploymentStrategy is not found in the empty JSON string", V1DeploymentStrategy.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1DeploymentStrategy.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1DeploymentStrategy` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1DeploymentStrategy` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `rollingUpdate` if (jsonObj.get("rollingUpdate") != null && !jsonObj.get("rollingUpdate").isJsonNull()) { - V1RollingUpdateDeployment.validateJsonObject(jsonObj.getAsJsonObject("rollingUpdate")); + V1RollingUpdateDeployment.validateJsonElement(jsonObj.get("rollingUpdate")); } if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); @@ -208,9 +205,9 @@ public void write(JsonWriter out, V1DeploymentStrategy value) throws IOException @Override public V1DeploymentStrategy read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -237,3 +234,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1DownwardAPIProjection.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1DownwardAPIProjection.java index a1397a473c..3ebee25499 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1DownwardAPIProjection.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1DownwardAPIProjection.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1DownwardAPIVolumeFile; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,17 +52,16 @@ /** * Represents downward API info for projecting into a projected volume. Note that this is identical to a downwardAPI volume source without the default mode. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1DownwardAPIProjection { public static final String SERIALIZED_NAME_ITEMS = "items"; @SerializedName(SERIALIZED_NAME_ITEMS) - private List items; + private List items = new ArrayList<>(); public V1DownwardAPIProjection() { } public V1DownwardAPIProjection items(List items) { - this.items = items; return this; } @@ -84,7 +83,6 @@ public List getItems() { return items; } - public void setItems(List items) { this.items = items; } @@ -142,25 +140,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1DownwardAPIProjection + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1DownwardAPIProjection */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1DownwardAPIProjection.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1DownwardAPIProjection.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1DownwardAPIProjection is not found in the empty JSON string", V1DownwardAPIProjection.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1DownwardAPIProjection.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1DownwardAPIProjection` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1DownwardAPIProjection` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (jsonObj.get("items") != null && !jsonObj.get("items").isJsonNull()) { JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); if (jsonArrayitems != null) { @@ -171,7 +170,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `items` (array) for (int i = 0; i < jsonArrayitems.size(); i++) { - V1DownwardAPIVolumeFile.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject()); + V1DownwardAPIVolumeFile.validateJsonElement(jsonArrayitems.get(i)); }; } } @@ -197,9 +196,9 @@ public void write(JsonWriter out, V1DownwardAPIProjection value) throws IOExcept @Override public V1DownwardAPIProjection read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -226,3 +225,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1DownwardAPIVolumeFile.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1DownwardAPIVolumeFile.java index 3f06c5b603..79ca9d32f8 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1DownwardAPIVolumeFile.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1DownwardAPIVolumeFile.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1ObjectFieldSelector; import io.kubernetes.client.openapi.models.V1ResourceFieldSelector; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -43,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -51,7 +51,7 @@ /** * DownwardAPIVolumeFile represents information to create the file containing the pod field */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1DownwardAPIVolumeFile { public static final String SERIALIZED_NAME_FIELD_REF = "fieldRef"; @SerializedName(SERIALIZED_NAME_FIELD_REF) @@ -73,7 +73,6 @@ public V1DownwardAPIVolumeFile() { } public V1DownwardAPIVolumeFile fieldRef(V1ObjectFieldSelector fieldRef) { - this.fieldRef = fieldRef; return this; } @@ -87,14 +86,12 @@ public V1ObjectFieldSelector getFieldRef() { return fieldRef; } - public void setFieldRef(V1ObjectFieldSelector fieldRef) { this.fieldRef = fieldRef; } public V1DownwardAPIVolumeFile mode(Integer mode) { - this.mode = mode; return this; } @@ -108,14 +105,12 @@ public Integer getMode() { return mode; } - public void setMode(Integer mode) { this.mode = mode; } public V1DownwardAPIVolumeFile path(String path) { - this.path = path; return this; } @@ -129,14 +124,12 @@ public String getPath() { return path; } - public void setPath(String path) { this.path = path; } public V1DownwardAPIVolumeFile resourceFieldRef(V1ResourceFieldSelector resourceFieldRef) { - this.resourceFieldRef = resourceFieldRef; return this; } @@ -150,7 +143,6 @@ public V1ResourceFieldSelector getResourceFieldRef() { return resourceFieldRef; } - public void setResourceFieldRef(V1ResourceFieldSelector resourceFieldRef) { this.resourceFieldRef = resourceFieldRef; } @@ -218,42 +210,43 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1DownwardAPIVolumeFile + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1DownwardAPIVolumeFile */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1DownwardAPIVolumeFile.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1DownwardAPIVolumeFile.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1DownwardAPIVolumeFile is not found in the empty JSON string", V1DownwardAPIVolumeFile.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1DownwardAPIVolumeFile.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1DownwardAPIVolumeFile` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1DownwardAPIVolumeFile` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1DownwardAPIVolumeFile.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `fieldRef` if (jsonObj.get("fieldRef") != null && !jsonObj.get("fieldRef").isJsonNull()) { - V1ObjectFieldSelector.validateJsonObject(jsonObj.getAsJsonObject("fieldRef")); + V1ObjectFieldSelector.validateJsonElement(jsonObj.get("fieldRef")); } if (!jsonObj.get("path").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `path` to be a primitive type in the JSON string but got `%s`", jsonObj.get("path").toString())); } // validate the optional field `resourceFieldRef` if (jsonObj.get("resourceFieldRef") != null && !jsonObj.get("resourceFieldRef").isJsonNull()) { - V1ResourceFieldSelector.validateJsonObject(jsonObj.getAsJsonObject("resourceFieldRef")); + V1ResourceFieldSelector.validateJsonElement(jsonObj.get("resourceFieldRef")); } } @@ -277,9 +270,9 @@ public void write(JsonWriter out, V1DownwardAPIVolumeFile value) throws IOExcept @Override public V1DownwardAPIVolumeFile read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -306,3 +299,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1DownwardAPIVolumeSource.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1DownwardAPIVolumeSource.java index 0f8c47df3a..0cbf826a96 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1DownwardAPIVolumeSource.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1DownwardAPIVolumeSource.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1DownwardAPIVolumeFile; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * DownwardAPIVolumeSource represents a volume containing downward API info. Downward API volumes support ownership management and SELinux relabeling. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1DownwardAPIVolumeSource { public static final String SERIALIZED_NAME_DEFAULT_MODE = "defaultMode"; @SerializedName(SERIALIZED_NAME_DEFAULT_MODE) @@ -60,13 +60,12 @@ public class V1DownwardAPIVolumeSource { public static final String SERIALIZED_NAME_ITEMS = "items"; @SerializedName(SERIALIZED_NAME_ITEMS) - private List items; + private List items = new ArrayList<>(); public V1DownwardAPIVolumeSource() { } public V1DownwardAPIVolumeSource defaultMode(Integer defaultMode) { - this.defaultMode = defaultMode; return this; } @@ -80,14 +79,12 @@ public Integer getDefaultMode() { return defaultMode; } - public void setDefaultMode(Integer defaultMode) { this.defaultMode = defaultMode; } public V1DownwardAPIVolumeSource items(List items) { - this.items = items; return this; } @@ -109,7 +106,6 @@ public List getItems() { return items; } - public void setItems(List items) { this.items = items; } @@ -170,25 +166,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1DownwardAPIVolumeSource + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1DownwardAPIVolumeSource */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1DownwardAPIVolumeSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1DownwardAPIVolumeSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1DownwardAPIVolumeSource is not found in the empty JSON string", V1DownwardAPIVolumeSource.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1DownwardAPIVolumeSource.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1DownwardAPIVolumeSource` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1DownwardAPIVolumeSource` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (jsonObj.get("items") != null && !jsonObj.get("items").isJsonNull()) { JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); if (jsonArrayitems != null) { @@ -199,7 +196,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `items` (array) for (int i = 0; i < jsonArrayitems.size(); i++) { - V1DownwardAPIVolumeFile.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject()); + V1DownwardAPIVolumeFile.validateJsonElement(jsonArrayitems.get(i)); }; } } @@ -225,9 +222,9 @@ public void write(JsonWriter out, V1DownwardAPIVolumeSource value) throws IOExce @Override public V1DownwardAPIVolumeSource read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -254,3 +251,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1EmptyDirVolumeSource.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1EmptyDirVolumeSource.java index 05bea5d0be..77ef7ef8c7 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1EmptyDirVolumeSource.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1EmptyDirVolumeSource.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.custom.Quantity; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * Represents an empty directory for a pod. Empty directory volumes support ownership management and SELinux relabeling. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1EmptyDirVolumeSource { public static final String SERIALIZED_NAME_MEDIUM = "medium"; @SerializedName(SERIALIZED_NAME_MEDIUM) @@ -64,7 +64,6 @@ public V1EmptyDirVolumeSource() { } public V1EmptyDirVolumeSource medium(String medium) { - this.medium = medium; return this; } @@ -78,14 +77,12 @@ public String getMedium() { return medium; } - public void setMedium(String medium) { this.medium = medium; } public V1EmptyDirVolumeSource sizeLimit(Quantity sizeLimit) { - this.sizeLimit = sizeLimit; return this; } @@ -99,7 +96,6 @@ public Quantity getSizeLimit() { return sizeLimit; } - public void setSizeLimit(Quantity sizeLimit) { this.sizeLimit = sizeLimit; } @@ -160,25 +156,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1EmptyDirVolumeSource + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1EmptyDirVolumeSource */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1EmptyDirVolumeSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1EmptyDirVolumeSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1EmptyDirVolumeSource is not found in the empty JSON string", V1EmptyDirVolumeSource.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1EmptyDirVolumeSource.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1EmptyDirVolumeSource` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1EmptyDirVolumeSource` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("medium") != null && !jsonObj.get("medium").isJsonNull()) && !jsonObj.get("medium").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `medium` to be a primitive type in the JSON string but got `%s`", jsonObj.get("medium").toString())); } @@ -207,9 +204,9 @@ public void write(JsonWriter out, V1EmptyDirVolumeSource value) throws IOExcepti @Override public V1EmptyDirVolumeSource read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -236,3 +233,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Endpoint.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Endpoint.java index 0f1c49b628..25c43ad9ae 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Endpoint.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Endpoint.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -24,6 +24,7 @@ import io.kubernetes.client.openapi.models.V1ObjectReference; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -48,7 +49,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -56,7 +56,7 @@ /** * Endpoint represents a single logical \"backend\" implementing a service. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1Endpoint { public static final String SERIALIZED_NAME_ADDRESSES = "addresses"; @SerializedName(SERIALIZED_NAME_ADDRESSES) @@ -94,7 +94,6 @@ public V1Endpoint() { } public V1Endpoint addresses(List addresses) { - this.addresses = addresses; return this; } @@ -116,14 +115,12 @@ public List getAddresses() { return addresses; } - public void setAddresses(List addresses) { this.addresses = addresses; } public V1Endpoint conditions(V1EndpointConditions conditions) { - this.conditions = conditions; return this; } @@ -137,14 +134,12 @@ public V1EndpointConditions getConditions() { return conditions; } - public void setConditions(V1EndpointConditions conditions) { this.conditions = conditions; } public V1Endpoint deprecatedTopology(Map deprecatedTopology) { - this.deprecatedTopology = deprecatedTopology; return this; } @@ -166,14 +161,12 @@ public Map getDeprecatedTopology() { return deprecatedTopology; } - public void setDeprecatedTopology(Map deprecatedTopology) { this.deprecatedTopology = deprecatedTopology; } public V1Endpoint hints(V1EndpointHints hints) { - this.hints = hints; return this; } @@ -187,14 +180,12 @@ public V1EndpointHints getHints() { return hints; } - public void setHints(V1EndpointHints hints) { this.hints = hints; } public V1Endpoint hostname(String hostname) { - this.hostname = hostname; return this; } @@ -208,14 +199,12 @@ public String getHostname() { return hostname; } - public void setHostname(String hostname) { this.hostname = hostname; } public V1Endpoint nodeName(String nodeName) { - this.nodeName = nodeName; return this; } @@ -229,14 +218,12 @@ public String getNodeName() { return nodeName; } - public void setNodeName(String nodeName) { this.nodeName = nodeName; } public V1Endpoint targetRef(V1ObjectReference targetRef) { - this.targetRef = targetRef; return this; } @@ -250,14 +237,12 @@ public V1ObjectReference getTargetRef() { return targetRef; } - public void setTargetRef(V1ObjectReference targetRef) { this.targetRef = targetRef; } public V1Endpoint zone(String zone) { - this.zone = zone; return this; } @@ -271,7 +256,6 @@ public String getZone() { return zone; } - public void setZone(String zone) { this.zone = zone; } @@ -351,32 +335,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1Endpoint + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1Endpoint */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1Endpoint.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1Endpoint.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1Endpoint is not found in the empty JSON string", V1Endpoint.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1Endpoint.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1Endpoint` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1Endpoint` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1Endpoint.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the required json array is present if (jsonObj.get("addresses") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); @@ -385,11 +370,11 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `conditions` if (jsonObj.get("conditions") != null && !jsonObj.get("conditions").isJsonNull()) { - V1EndpointConditions.validateJsonObject(jsonObj.getAsJsonObject("conditions")); + V1EndpointConditions.validateJsonElement(jsonObj.get("conditions")); } // validate the optional field `hints` if (jsonObj.get("hints") != null && !jsonObj.get("hints").isJsonNull()) { - V1EndpointHints.validateJsonObject(jsonObj.getAsJsonObject("hints")); + V1EndpointHints.validateJsonElement(jsonObj.get("hints")); } if ((jsonObj.get("hostname") != null && !jsonObj.get("hostname").isJsonNull()) && !jsonObj.get("hostname").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `hostname` to be a primitive type in the JSON string but got `%s`", jsonObj.get("hostname").toString())); @@ -399,7 +384,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `targetRef` if (jsonObj.get("targetRef") != null && !jsonObj.get("targetRef").isJsonNull()) { - V1ObjectReference.validateJsonObject(jsonObj.getAsJsonObject("targetRef")); + V1ObjectReference.validateJsonElement(jsonObj.get("targetRef")); } if ((jsonObj.get("zone") != null && !jsonObj.get("zone").isJsonNull()) && !jsonObj.get("zone").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `zone` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zone").toString())); @@ -426,9 +411,9 @@ public void write(JsonWriter out, V1Endpoint value) throws IOException { @Override public V1Endpoint read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -455,3 +440,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1EndpointAddress.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1EndpointAddress.java index 8d42d257e2..359f0773d0 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1EndpointAddress.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1EndpointAddress.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.openapi.models.V1ObjectReference; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * EndpointAddress is a tuple that describes single IP address. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1EndpointAddress { public static final String SERIALIZED_NAME_HOSTNAME = "hostname"; @SerializedName(SERIALIZED_NAME_HOSTNAME) @@ -72,7 +72,6 @@ public V1EndpointAddress() { } public V1EndpointAddress hostname(String hostname) { - this.hostname = hostname; return this; } @@ -86,14 +85,12 @@ public String getHostname() { return hostname; } - public void setHostname(String hostname) { this.hostname = hostname; } public V1EndpointAddress ip(String ip) { - this.ip = ip; return this; } @@ -107,14 +104,12 @@ public String getIp() { return ip; } - public void setIp(String ip) { this.ip = ip; } public V1EndpointAddress nodeName(String nodeName) { - this.nodeName = nodeName; return this; } @@ -128,14 +123,12 @@ public String getNodeName() { return nodeName; } - public void setNodeName(String nodeName) { this.nodeName = nodeName; } public V1EndpointAddress targetRef(V1ObjectReference targetRef) { - this.targetRef = targetRef; return this; } @@ -149,7 +142,6 @@ public V1ObjectReference getTargetRef() { return targetRef; } - public void setTargetRef(V1ObjectReference targetRef) { this.targetRef = targetRef; } @@ -217,32 +209,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1EndpointAddress + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1EndpointAddress */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1EndpointAddress.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1EndpointAddress.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1EndpointAddress is not found in the empty JSON string", V1EndpointAddress.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1EndpointAddress.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1EndpointAddress` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1EndpointAddress` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1EndpointAddress.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("hostname") != null && !jsonObj.get("hostname").isJsonNull()) && !jsonObj.get("hostname").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `hostname` to be a primitive type in the JSON string but got `%s`", jsonObj.get("hostname").toString())); } @@ -254,7 +247,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `targetRef` if (jsonObj.get("targetRef") != null && !jsonObj.get("targetRef").isJsonNull()) { - V1ObjectReference.validateJsonObject(jsonObj.getAsJsonObject("targetRef")); + V1ObjectReference.validateJsonElement(jsonObj.get("targetRef")); } } @@ -278,9 +271,9 @@ public void write(JsonWriter out, V1EndpointAddress value) throws IOException { @Override public V1EndpointAddress read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -307,3 +300,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1EndpointConditions.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1EndpointConditions.java index f01fc17e90..c07a814ce1 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1EndpointConditions.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1EndpointConditions.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * EndpointConditions represents the current condition of an endpoint. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1EndpointConditions { public static final String SERIALIZED_NAME_READY = "ready"; @SerializedName(SERIALIZED_NAME_READY) @@ -67,7 +67,6 @@ public V1EndpointConditions() { } public V1EndpointConditions ready(Boolean ready) { - this.ready = ready; return this; } @@ -81,14 +80,12 @@ public Boolean getReady() { return ready; } - public void setReady(Boolean ready) { this.ready = ready; } public V1EndpointConditions serving(Boolean serving) { - this.serving = serving; return this; } @@ -102,14 +99,12 @@ public Boolean getServing() { return serving; } - public void setServing(Boolean serving) { this.serving = serving; } public V1EndpointConditions terminating(Boolean terminating) { - this.terminating = terminating; return this; } @@ -123,7 +118,6 @@ public Boolean getTerminating() { return terminating; } - public void setTerminating(Boolean terminating) { this.terminating = terminating; } @@ -187,25 +181,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1EndpointConditions + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1EndpointConditions */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1EndpointConditions.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1EndpointConditions.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1EndpointConditions is not found in the empty JSON string", V1EndpointConditions.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1EndpointConditions.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1EndpointConditions` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1EndpointConditions` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -228,9 +223,9 @@ public void write(JsonWriter out, V1EndpointConditions value) throws IOException @Override public V1EndpointConditions read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -257,3 +252,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1EndpointHints.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1EndpointHints.java index fc81371def..75ff896ac5 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1EndpointHints.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1EndpointHints.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1ForZone; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,17 +52,16 @@ /** * EndpointHints provides hints describing how an endpoint should be consumed. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1EndpointHints { public static final String SERIALIZED_NAME_FOR_ZONES = "forZones"; @SerializedName(SERIALIZED_NAME_FOR_ZONES) - private List forZones; + private List forZones = new ArrayList<>(); public V1EndpointHints() { } public V1EndpointHints forZones(List forZones) { - this.forZones = forZones; return this; } @@ -84,7 +83,6 @@ public List getForZones() { return forZones; } - public void setForZones(List forZones) { this.forZones = forZones; } @@ -142,25 +140,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1EndpointHints + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1EndpointHints */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1EndpointHints.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1EndpointHints.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1EndpointHints is not found in the empty JSON string", V1EndpointHints.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1EndpointHints.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1EndpointHints` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1EndpointHints` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (jsonObj.get("forZones") != null && !jsonObj.get("forZones").isJsonNull()) { JsonArray jsonArrayforZones = jsonObj.getAsJsonArray("forZones"); if (jsonArrayforZones != null) { @@ -171,7 +170,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `forZones` (array) for (int i = 0; i < jsonArrayforZones.size(); i++) { - V1ForZone.validateJsonObject(jsonArrayforZones.get(i).getAsJsonObject()); + V1ForZone.validateJsonElement(jsonArrayforZones.get(i)); }; } } @@ -197,9 +196,9 @@ public void write(JsonWriter out, V1EndpointHints value) throws IOException { @Override public V1EndpointHints read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -226,3 +225,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1EndpointSlice.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1EndpointSlice.java index 8d4a9751f5..e389fb9bda 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1EndpointSlice.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1EndpointSlice.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -24,6 +24,7 @@ import io.kubernetes.client.openapi.models.V1ObjectMeta; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -46,7 +47,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -54,7 +54,7 @@ /** * EndpointSlice represents a subset of the endpoints that implement a service. For a given service there may be multiple EndpointSlice objects, selected by labels, which must be joined to produce the full set of endpoints. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1EndpointSlice implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_ADDRESS_TYPE = "addressType"; @SerializedName(SERIALIZED_NAME_ADDRESS_TYPE) @@ -78,13 +78,12 @@ public class V1EndpointSlice implements io.kubernetes.client.common.KubernetesOb public static final String SERIALIZED_NAME_PORTS = "ports"; @SerializedName(SERIALIZED_NAME_PORTS) - private List ports; + private List ports = new ArrayList<>(); public V1EndpointSlice() { } public V1EndpointSlice addressType(String addressType) { - this.addressType = addressType; return this; } @@ -98,14 +97,12 @@ public String getAddressType() { return addressType; } - public void setAddressType(String addressType) { this.addressType = addressType; } public V1EndpointSlice apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -119,14 +116,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1EndpointSlice endpoints(List endpoints) { - this.endpoints = endpoints; return this; } @@ -148,14 +143,12 @@ public List getEndpoints() { return endpoints; } - public void setEndpoints(List endpoints) { this.endpoints = endpoints; } public V1EndpointSlice kind(String kind) { - this.kind = kind; return this; } @@ -169,14 +162,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1EndpointSlice metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -190,14 +181,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V1EndpointSlice ports(List ports) { - this.ports = ports; return this; } @@ -219,7 +208,6 @@ public List getPorts() { return ports; } - public void setPorts(List ports) { this.ports = ports; } @@ -294,32 +282,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1EndpointSlice + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1EndpointSlice */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1EndpointSlice.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1EndpointSlice.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1EndpointSlice is not found in the empty JSON string", V1EndpointSlice.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1EndpointSlice.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1EndpointSlice` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1EndpointSlice` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1EndpointSlice.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("addressType").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `addressType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addressType").toString())); } @@ -334,14 +323,14 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArrayendpoints = jsonObj.getAsJsonArray("endpoints"); // validate the required field `endpoints` (array) for (int i = 0; i < jsonArrayendpoints.size(); i++) { - V1Endpoint.validateJsonObject(jsonArrayendpoints.get(i).getAsJsonObject()); + V1Endpoint.validateJsonElement(jsonArrayendpoints.get(i)); }; if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } if (jsonObj.get("ports") != null && !jsonObj.get("ports").isJsonNull()) { JsonArray jsonArrayports = jsonObj.getAsJsonArray("ports"); @@ -353,7 +342,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `ports` (array) for (int i = 0; i < jsonArrayports.size(); i++) { - DiscoveryV1EndpointPort.validateJsonObject(jsonArrayports.get(i).getAsJsonObject()); + DiscoveryV1EndpointPort.validateJsonElement(jsonArrayports.get(i)); }; } } @@ -379,9 +368,9 @@ public void write(JsonWriter out, V1EndpointSlice value) throws IOException { @Override public V1EndpointSlice read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -408,3 +397,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1EndpointSliceList.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1EndpointSliceList.java index 42ef80a590..3b8a239866 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1EndpointSliceList.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1EndpointSliceList.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1ListMeta; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * EndpointSliceList represents a list of endpoint slices */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1EndpointSliceList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -75,7 +75,6 @@ public V1EndpointSliceList() { } public V1EndpointSliceList apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -89,14 +88,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1EndpointSliceList items(List items) { - this.items = items; return this; } @@ -118,14 +115,12 @@ public List getItems() { return items; } - public void setItems(List items) { this.items = items; } public V1EndpointSliceList kind(String kind) { - this.kind = kind; return this; } @@ -139,14 +134,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1EndpointSliceList metadata(V1ListMeta metadata) { - this.metadata = metadata; return this; } @@ -160,7 +153,6 @@ public V1ListMeta getMetadata() { return metadata; } - public void setMetadata(V1ListMeta metadata) { this.metadata = metadata; } @@ -228,32 +220,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1EndpointSliceList + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1EndpointSliceList */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1EndpointSliceList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1EndpointSliceList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1EndpointSliceList is not found in the empty JSON string", V1EndpointSliceList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1EndpointSliceList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1EndpointSliceList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1EndpointSliceList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1EndpointSliceList.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -265,14 +258,14 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); // validate the required field `items` (array) for (int i = 0; i < jsonArrayitems.size(); i++) { - V1EndpointSlice.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject()); + V1EndpointSlice.validateJsonElement(jsonArrayitems.get(i)); }; if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ListMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ListMeta.validateJsonElement(jsonObj.get("metadata")); } } @@ -296,9 +289,9 @@ public void write(JsonWriter out, V1EndpointSliceList value) throws IOException @Override public V1EndpointSliceList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -325,3 +318,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1EndpointSubset.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1EndpointSubset.java index 5b52e89863..512c464649 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1EndpointSubset.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1EndpointSubset.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1EndpointAddress; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,25 +53,24 @@ /** * 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 ] */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1EndpointSubset { public static final String SERIALIZED_NAME_ADDRESSES = "addresses"; @SerializedName(SERIALIZED_NAME_ADDRESSES) - private List addresses; + private List addresses = new ArrayList<>(); public static final String SERIALIZED_NAME_NOT_READY_ADDRESSES = "notReadyAddresses"; @SerializedName(SERIALIZED_NAME_NOT_READY_ADDRESSES) - private List notReadyAddresses; + private List notReadyAddresses = new ArrayList<>(); public static final String SERIALIZED_NAME_PORTS = "ports"; @SerializedName(SERIALIZED_NAME_PORTS) - private List ports; + private List ports = new ArrayList<>(); public V1EndpointSubset() { } public V1EndpointSubset addresses(List addresses) { - this.addresses = addresses; return this; } @@ -93,14 +92,12 @@ public List getAddresses() { return addresses; } - public void setAddresses(List addresses) { this.addresses = addresses; } public V1EndpointSubset notReadyAddresses(List notReadyAddresses) { - this.notReadyAddresses = notReadyAddresses; return this; } @@ -122,14 +119,12 @@ public List getNotReadyAddresses() { return notReadyAddresses; } - public void setNotReadyAddresses(List notReadyAddresses) { this.notReadyAddresses = notReadyAddresses; } public V1EndpointSubset ports(List ports) { - this.ports = ports; return this; } @@ -151,7 +146,6 @@ public List getPorts() { return ports; } - public void setPorts(List ports) { this.ports = ports; } @@ -215,25 +209,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1EndpointSubset + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1EndpointSubset */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1EndpointSubset.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1EndpointSubset.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1EndpointSubset is not found in the empty JSON string", V1EndpointSubset.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1EndpointSubset.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1EndpointSubset` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1EndpointSubset` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (jsonObj.get("addresses") != null && !jsonObj.get("addresses").isJsonNull()) { JsonArray jsonArrayaddresses = jsonObj.getAsJsonArray("addresses"); if (jsonArrayaddresses != null) { @@ -244,7 +239,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `addresses` (array) for (int i = 0; i < jsonArrayaddresses.size(); i++) { - V1EndpointAddress.validateJsonObject(jsonArrayaddresses.get(i).getAsJsonObject()); + V1EndpointAddress.validateJsonElement(jsonArrayaddresses.get(i)); }; } } @@ -258,7 +253,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `notReadyAddresses` (array) for (int i = 0; i < jsonArraynotReadyAddresses.size(); i++) { - V1EndpointAddress.validateJsonObject(jsonArraynotReadyAddresses.get(i).getAsJsonObject()); + V1EndpointAddress.validateJsonElement(jsonArraynotReadyAddresses.get(i)); }; } } @@ -272,7 +267,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `ports` (array) for (int i = 0; i < jsonArrayports.size(); i++) { - CoreV1EndpointPort.validateJsonObject(jsonArrayports.get(i).getAsJsonObject()); + CoreV1EndpointPort.validateJsonElement(jsonArrayports.get(i)); }; } } @@ -298,9 +293,9 @@ public void write(JsonWriter out, V1EndpointSubset value) throws IOException { @Override public V1EndpointSubset read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -327,3 +322,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Endpoints.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Endpoints.java index 9e13de967c..ef40eadc6c 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Endpoints.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Endpoints.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1ObjectMeta; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * 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}] }, ] */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1Endpoints implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -69,13 +69,12 @@ public class V1Endpoints implements io.kubernetes.client.common.KubernetesObject public static final String SERIALIZED_NAME_SUBSETS = "subsets"; @SerializedName(SERIALIZED_NAME_SUBSETS) - private List subsets; + private List subsets = new ArrayList<>(); public V1Endpoints() { } public V1Endpoints apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -89,14 +88,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1Endpoints kind(String kind) { - this.kind = kind; return this; } @@ -110,14 +107,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1Endpoints metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -131,14 +126,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V1Endpoints subsets(List subsets) { - this.subsets = subsets; return this; } @@ -160,7 +153,6 @@ public List getSubsets() { return subsets; } - public void setSubsets(List subsets) { this.subsets = subsets; } @@ -227,25 +219,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1Endpoints + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1Endpoints */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1Endpoints.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1Endpoints.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1Endpoints is not found in the empty JSON string", V1Endpoints.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1Endpoints.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1Endpoints` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1Endpoints` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -254,7 +247,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } if (jsonObj.get("subsets") != null && !jsonObj.get("subsets").isJsonNull()) { JsonArray jsonArraysubsets = jsonObj.getAsJsonArray("subsets"); @@ -266,7 +259,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `subsets` (array) for (int i = 0; i < jsonArraysubsets.size(); i++) { - V1EndpointSubset.validateJsonObject(jsonArraysubsets.get(i).getAsJsonObject()); + V1EndpointSubset.validateJsonElement(jsonArraysubsets.get(i)); }; } } @@ -292,9 +285,9 @@ public void write(JsonWriter out, V1Endpoints value) throws IOException { @Override public V1Endpoints read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -321,3 +314,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1EndpointsList.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1EndpointsList.java index c3885efe8b..dc15558206 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1EndpointsList.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1EndpointsList.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1ListMeta; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * EndpointsList is a list of endpoints. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1EndpointsList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -75,7 +75,6 @@ public V1EndpointsList() { } public V1EndpointsList apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -89,14 +88,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1EndpointsList items(List items) { - this.items = items; return this; } @@ -118,14 +115,12 @@ public List getItems() { return items; } - public void setItems(List items) { this.items = items; } public V1EndpointsList kind(String kind) { - this.kind = kind; return this; } @@ -139,14 +134,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1EndpointsList metadata(V1ListMeta metadata) { - this.metadata = metadata; return this; } @@ -160,7 +153,6 @@ public V1ListMeta getMetadata() { return metadata; } - public void setMetadata(V1ListMeta metadata) { this.metadata = metadata; } @@ -228,32 +220,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1EndpointsList + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1EndpointsList */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1EndpointsList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1EndpointsList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1EndpointsList is not found in the empty JSON string", V1EndpointsList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1EndpointsList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1EndpointsList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1EndpointsList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1EndpointsList.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -265,14 +258,14 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); // validate the required field `items` (array) for (int i = 0; i < jsonArrayitems.size(); i++) { - V1Endpoints.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject()); + V1Endpoints.validateJsonElement(jsonArrayitems.get(i)); }; if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ListMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ListMeta.validateJsonElement(jsonObj.get("metadata")); } } @@ -296,9 +289,9 @@ public void write(JsonWriter out, V1EndpointsList value) throws IOException { @Override public V1EndpointsList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -325,3 +318,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1EnvFromSource.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1EnvFromSource.java index 2830aa8522..d0304132e4 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1EnvFromSource.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1EnvFromSource.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1ConfigMapEnvSource; import io.kubernetes.client.openapi.models.V1SecretEnvSource; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -43,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -51,7 +51,7 @@ /** * EnvFromSource represents the source of a set of ConfigMaps */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1EnvFromSource { public static final String SERIALIZED_NAME_CONFIG_MAP_REF = "configMapRef"; @SerializedName(SERIALIZED_NAME_CONFIG_MAP_REF) @@ -69,7 +69,6 @@ public V1EnvFromSource() { } public V1EnvFromSource configMapRef(V1ConfigMapEnvSource configMapRef) { - this.configMapRef = configMapRef; return this; } @@ -83,14 +82,12 @@ public V1ConfigMapEnvSource getConfigMapRef() { return configMapRef; } - public void setConfigMapRef(V1ConfigMapEnvSource configMapRef) { this.configMapRef = configMapRef; } public V1EnvFromSource prefix(String prefix) { - this.prefix = prefix; return this; } @@ -104,14 +101,12 @@ public String getPrefix() { return prefix; } - public void setPrefix(String prefix) { this.prefix = prefix; } public V1EnvFromSource secretRef(V1SecretEnvSource secretRef) { - this.secretRef = secretRef; return this; } @@ -125,7 +120,6 @@ public V1SecretEnvSource getSecretRef() { return secretRef; } - public void setSecretRef(V1SecretEnvSource secretRef) { this.secretRef = secretRef; } @@ -189,35 +183,36 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1EnvFromSource + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1EnvFromSource */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1EnvFromSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1EnvFromSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1EnvFromSource is not found in the empty JSON string", V1EnvFromSource.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1EnvFromSource.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1EnvFromSource` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1EnvFromSource` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `configMapRef` if (jsonObj.get("configMapRef") != null && !jsonObj.get("configMapRef").isJsonNull()) { - V1ConfigMapEnvSource.validateJsonObject(jsonObj.getAsJsonObject("configMapRef")); + V1ConfigMapEnvSource.validateJsonElement(jsonObj.get("configMapRef")); } if ((jsonObj.get("prefix") != null && !jsonObj.get("prefix").isJsonNull()) && !jsonObj.get("prefix").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `prefix` to be a primitive type in the JSON string but got `%s`", jsonObj.get("prefix").toString())); } // validate the optional field `secretRef` if (jsonObj.get("secretRef") != null && !jsonObj.get("secretRef").isJsonNull()) { - V1SecretEnvSource.validateJsonObject(jsonObj.getAsJsonObject("secretRef")); + V1SecretEnvSource.validateJsonElement(jsonObj.get("secretRef")); } } @@ -241,9 +236,9 @@ public void write(JsonWriter out, V1EnvFromSource value) throws IOException { @Override public V1EnvFromSource read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -270,3 +265,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1EnvVar.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1EnvVar.java index 4e897e8581..5a51889f67 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1EnvVar.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1EnvVar.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.openapi.models.V1EnvVarSource; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * EnvVar represents an environment variable present in a Container. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1EnvVar { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) @@ -68,7 +68,6 @@ public V1EnvVar() { } public V1EnvVar name(String name) { - this.name = name; return this; } @@ -82,14 +81,12 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } public V1EnvVar value(String value) { - this.value = value; return this; } @@ -103,14 +100,12 @@ public String getValue() { return value; } - public void setValue(String value) { this.value = value; } public V1EnvVar valueFrom(V1EnvVarSource valueFrom) { - this.valueFrom = valueFrom; return this; } @@ -124,7 +119,6 @@ public V1EnvVarSource getValueFrom() { return valueFrom; } - public void setValueFrom(V1EnvVarSource valueFrom) { this.valueFrom = valueFrom; } @@ -189,32 +183,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1EnvVar + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1EnvVar */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1EnvVar.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1EnvVar.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1EnvVar is not found in the empty JSON string", V1EnvVar.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1EnvVar.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1EnvVar` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1EnvVar` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1EnvVar.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } @@ -223,7 +218,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `valueFrom` if (jsonObj.get("valueFrom") != null && !jsonObj.get("valueFrom").isJsonNull()) { - V1EnvVarSource.validateJsonObject(jsonObj.getAsJsonObject("valueFrom")); + V1EnvVarSource.validateJsonElement(jsonObj.get("valueFrom")); } } @@ -247,9 +242,9 @@ public void write(JsonWriter out, V1EnvVar value) throws IOException { @Override public V1EnvVar read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -276,3 +271,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1EnvVarSource.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1EnvVarSource.java index 35bf2b207b..f77dd5de42 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1EnvVarSource.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1EnvVarSource.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -24,6 +24,7 @@ import io.kubernetes.client.openapi.models.V1ResourceFieldSelector; import io.kubernetes.client.openapi.models.V1SecretKeySelector; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * EnvVarSource represents a source for the value of an EnvVar. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1EnvVarSource { public static final String SERIALIZED_NAME_CONFIG_MAP_KEY_REF = "configMapKeyRef"; @SerializedName(SERIALIZED_NAME_CONFIG_MAP_KEY_REF) @@ -75,7 +75,6 @@ public V1EnvVarSource() { } public V1EnvVarSource configMapKeyRef(V1ConfigMapKeySelector configMapKeyRef) { - this.configMapKeyRef = configMapKeyRef; return this; } @@ -89,14 +88,12 @@ public V1ConfigMapKeySelector getConfigMapKeyRef() { return configMapKeyRef; } - public void setConfigMapKeyRef(V1ConfigMapKeySelector configMapKeyRef) { this.configMapKeyRef = configMapKeyRef; } public V1EnvVarSource fieldRef(V1ObjectFieldSelector fieldRef) { - this.fieldRef = fieldRef; return this; } @@ -110,14 +107,12 @@ public V1ObjectFieldSelector getFieldRef() { return fieldRef; } - public void setFieldRef(V1ObjectFieldSelector fieldRef) { this.fieldRef = fieldRef; } public V1EnvVarSource resourceFieldRef(V1ResourceFieldSelector resourceFieldRef) { - this.resourceFieldRef = resourceFieldRef; return this; } @@ -131,14 +126,12 @@ public V1ResourceFieldSelector getResourceFieldRef() { return resourceFieldRef; } - public void setResourceFieldRef(V1ResourceFieldSelector resourceFieldRef) { this.resourceFieldRef = resourceFieldRef; } public V1EnvVarSource secretKeyRef(V1SecretKeySelector secretKeyRef) { - this.secretKeyRef = secretKeyRef; return this; } @@ -152,7 +145,6 @@ public V1SecretKeySelector getSecretKeyRef() { return secretKeyRef; } - public void setSecretKeyRef(V1SecretKeySelector secretKeyRef) { this.secretKeyRef = secretKeyRef; } @@ -219,40 +211,41 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1EnvVarSource + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1EnvVarSource */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1EnvVarSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1EnvVarSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1EnvVarSource is not found in the empty JSON string", V1EnvVarSource.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1EnvVarSource.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1EnvVarSource` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1EnvVarSource` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `configMapKeyRef` if (jsonObj.get("configMapKeyRef") != null && !jsonObj.get("configMapKeyRef").isJsonNull()) { - V1ConfigMapKeySelector.validateJsonObject(jsonObj.getAsJsonObject("configMapKeyRef")); + V1ConfigMapKeySelector.validateJsonElement(jsonObj.get("configMapKeyRef")); } // validate the optional field `fieldRef` if (jsonObj.get("fieldRef") != null && !jsonObj.get("fieldRef").isJsonNull()) { - V1ObjectFieldSelector.validateJsonObject(jsonObj.getAsJsonObject("fieldRef")); + V1ObjectFieldSelector.validateJsonElement(jsonObj.get("fieldRef")); } // validate the optional field `resourceFieldRef` if (jsonObj.get("resourceFieldRef") != null && !jsonObj.get("resourceFieldRef").isJsonNull()) { - V1ResourceFieldSelector.validateJsonObject(jsonObj.getAsJsonObject("resourceFieldRef")); + V1ResourceFieldSelector.validateJsonElement(jsonObj.get("resourceFieldRef")); } // validate the optional field `secretKeyRef` if (jsonObj.get("secretKeyRef") != null && !jsonObj.get("secretKeyRef").isJsonNull()) { - V1SecretKeySelector.validateJsonObject(jsonObj.getAsJsonObject("secretKeyRef")); + V1SecretKeySelector.validateJsonElement(jsonObj.get("secretKeyRef")); } } @@ -276,9 +269,9 @@ public void write(JsonWriter out, V1EnvVarSource value) throws IOException { @Override public V1EnvVarSource read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -305,3 +298,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1EphemeralContainer.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1EphemeralContainer.java index ea94fe07aa..1e830e8a6b 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1EphemeralContainer.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1EphemeralContainer.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -31,6 +31,7 @@ import io.kubernetes.client.openapi.models.V1VolumeMount; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -53,7 +54,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -61,23 +61,23 @@ /** * An EphemeralContainer is a temporary container that you may add to an existing Pod for user-initiated activities such as debugging. Ephemeral containers have no resource or scheduling guarantees, and they will not be restarted when they exit or when a Pod is removed or restarted. The kubelet may evict a Pod if an ephemeral container causes the Pod to exceed its resource allocation. To add an ephemeral container, use the ephemeralcontainers subresource of an existing Pod. Ephemeral containers may not be removed or restarted. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1EphemeralContainer { public static final String SERIALIZED_NAME_ARGS = "args"; @SerializedName(SERIALIZED_NAME_ARGS) - private List args; + private List args = new ArrayList<>(); public static final String SERIALIZED_NAME_COMMAND = "command"; @SerializedName(SERIALIZED_NAME_COMMAND) - private List command; + private List command = new ArrayList<>(); public static final String SERIALIZED_NAME_ENV = "env"; @SerializedName(SERIALIZED_NAME_ENV) - private List env; + private List env = new ArrayList<>(); public static final String SERIALIZED_NAME_ENV_FROM = "envFrom"; @SerializedName(SERIALIZED_NAME_ENV_FROM) - private List envFrom; + private List envFrom = new ArrayList<>(); public static final String SERIALIZED_NAME_IMAGE = "image"; @SerializedName(SERIALIZED_NAME_IMAGE) @@ -101,7 +101,7 @@ public class V1EphemeralContainer { public static final String SERIALIZED_NAME_PORTS = "ports"; @SerializedName(SERIALIZED_NAME_PORTS) - private List ports; + private List ports = new ArrayList<>(); public static final String SERIALIZED_NAME_READINESS_PROBE = "readinessProbe"; @SerializedName(SERIALIZED_NAME_READINESS_PROBE) @@ -109,7 +109,7 @@ public class V1EphemeralContainer { public static final String SERIALIZED_NAME_RESIZE_POLICY = "resizePolicy"; @SerializedName(SERIALIZED_NAME_RESIZE_POLICY) - private List resizePolicy; + private List resizePolicy = new ArrayList<>(); public static final String SERIALIZED_NAME_RESOURCES = "resources"; @SerializedName(SERIALIZED_NAME_RESOURCES) @@ -153,11 +153,11 @@ public class V1EphemeralContainer { public static final String SERIALIZED_NAME_VOLUME_DEVICES = "volumeDevices"; @SerializedName(SERIALIZED_NAME_VOLUME_DEVICES) - private List volumeDevices; + private List volumeDevices = new ArrayList<>(); public static final String SERIALIZED_NAME_VOLUME_MOUNTS = "volumeMounts"; @SerializedName(SERIALIZED_NAME_VOLUME_MOUNTS) - private List volumeMounts; + private List volumeMounts = new ArrayList<>(); public static final String SERIALIZED_NAME_WORKING_DIR = "workingDir"; @SerializedName(SERIALIZED_NAME_WORKING_DIR) @@ -167,7 +167,6 @@ public V1EphemeralContainer() { } public V1EphemeralContainer args(List args) { - this.args = args; return this; } @@ -189,14 +188,12 @@ public List getArgs() { return args; } - public void setArgs(List args) { this.args = args; } public V1EphemeralContainer command(List command) { - this.command = command; return this; } @@ -218,14 +215,12 @@ public List getCommand() { return command; } - public void setCommand(List command) { this.command = command; } public V1EphemeralContainer env(List env) { - this.env = env; return this; } @@ -247,14 +242,12 @@ public List getEnv() { return env; } - public void setEnv(List env) { this.env = env; } public V1EphemeralContainer envFrom(List envFrom) { - this.envFrom = envFrom; return this; } @@ -276,14 +269,12 @@ public List getEnvFrom() { return envFrom; } - public void setEnvFrom(List envFrom) { this.envFrom = envFrom; } public V1EphemeralContainer image(String image) { - this.image = image; return this; } @@ -297,14 +288,12 @@ public String getImage() { return image; } - public void setImage(String image) { this.image = image; } public V1EphemeralContainer imagePullPolicy(String imagePullPolicy) { - this.imagePullPolicy = imagePullPolicy; return this; } @@ -318,14 +307,12 @@ public String getImagePullPolicy() { return imagePullPolicy; } - public void setImagePullPolicy(String imagePullPolicy) { this.imagePullPolicy = imagePullPolicy; } public V1EphemeralContainer lifecycle(V1Lifecycle lifecycle) { - this.lifecycle = lifecycle; return this; } @@ -339,14 +326,12 @@ public V1Lifecycle getLifecycle() { return lifecycle; } - public void setLifecycle(V1Lifecycle lifecycle) { this.lifecycle = lifecycle; } public V1EphemeralContainer livenessProbe(V1Probe livenessProbe) { - this.livenessProbe = livenessProbe; return this; } @@ -360,14 +345,12 @@ public V1Probe getLivenessProbe() { return livenessProbe; } - public void setLivenessProbe(V1Probe livenessProbe) { this.livenessProbe = livenessProbe; } public V1EphemeralContainer name(String name) { - this.name = name; return this; } @@ -381,14 +364,12 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } public V1EphemeralContainer ports(List ports) { - this.ports = ports; return this; } @@ -410,14 +391,12 @@ public List getPorts() { return ports; } - public void setPorts(List ports) { this.ports = ports; } public V1EphemeralContainer readinessProbe(V1Probe readinessProbe) { - this.readinessProbe = readinessProbe; return this; } @@ -431,14 +410,12 @@ public V1Probe getReadinessProbe() { return readinessProbe; } - public void setReadinessProbe(V1Probe readinessProbe) { this.readinessProbe = readinessProbe; } public V1EphemeralContainer resizePolicy(List resizePolicy) { - this.resizePolicy = resizePolicy; return this; } @@ -460,14 +437,12 @@ public List getResizePolicy() { return resizePolicy; } - public void setResizePolicy(List resizePolicy) { this.resizePolicy = resizePolicy; } public V1EphemeralContainer resources(V1ResourceRequirements resources) { - this.resources = resources; return this; } @@ -481,14 +456,12 @@ public V1ResourceRequirements getResources() { return resources; } - public void setResources(V1ResourceRequirements resources) { this.resources = resources; } public V1EphemeralContainer restartPolicy(String restartPolicy) { - this.restartPolicy = restartPolicy; return this; } @@ -502,14 +475,12 @@ public String getRestartPolicy() { return restartPolicy; } - public void setRestartPolicy(String restartPolicy) { this.restartPolicy = restartPolicy; } public V1EphemeralContainer securityContext(V1SecurityContext securityContext) { - this.securityContext = securityContext; return this; } @@ -523,14 +494,12 @@ public V1SecurityContext getSecurityContext() { return securityContext; } - public void setSecurityContext(V1SecurityContext securityContext) { this.securityContext = securityContext; } public V1EphemeralContainer startupProbe(V1Probe startupProbe) { - this.startupProbe = startupProbe; return this; } @@ -544,14 +513,12 @@ public V1Probe getStartupProbe() { return startupProbe; } - public void setStartupProbe(V1Probe startupProbe) { this.startupProbe = startupProbe; } public V1EphemeralContainer stdin(Boolean stdin) { - this.stdin = stdin; return this; } @@ -565,14 +532,12 @@ public Boolean getStdin() { return stdin; } - public void setStdin(Boolean stdin) { this.stdin = stdin; } public V1EphemeralContainer stdinOnce(Boolean stdinOnce) { - this.stdinOnce = stdinOnce; return this; } @@ -586,14 +551,12 @@ public Boolean getStdinOnce() { return stdinOnce; } - public void setStdinOnce(Boolean stdinOnce) { this.stdinOnce = stdinOnce; } public V1EphemeralContainer targetContainerName(String targetContainerName) { - this.targetContainerName = targetContainerName; return this; } @@ -607,14 +570,12 @@ public String getTargetContainerName() { return targetContainerName; } - public void setTargetContainerName(String targetContainerName) { this.targetContainerName = targetContainerName; } public V1EphemeralContainer terminationMessagePath(String terminationMessagePath) { - this.terminationMessagePath = terminationMessagePath; return this; } @@ -628,14 +589,12 @@ public String getTerminationMessagePath() { return terminationMessagePath; } - public void setTerminationMessagePath(String terminationMessagePath) { this.terminationMessagePath = terminationMessagePath; } public V1EphemeralContainer terminationMessagePolicy(String terminationMessagePolicy) { - this.terminationMessagePolicy = terminationMessagePolicy; return this; } @@ -649,14 +608,12 @@ public String getTerminationMessagePolicy() { return terminationMessagePolicy; } - public void setTerminationMessagePolicy(String terminationMessagePolicy) { this.terminationMessagePolicy = terminationMessagePolicy; } public V1EphemeralContainer tty(Boolean tty) { - this.tty = tty; return this; } @@ -670,14 +627,12 @@ public Boolean getTty() { return tty; } - public void setTty(Boolean tty) { this.tty = tty; } public V1EphemeralContainer volumeDevices(List volumeDevices) { - this.volumeDevices = volumeDevices; return this; } @@ -699,14 +654,12 @@ public List getVolumeDevices() { return volumeDevices; } - public void setVolumeDevices(List volumeDevices) { this.volumeDevices = volumeDevices; } public V1EphemeralContainer volumeMounts(List volumeMounts) { - this.volumeMounts = volumeMounts; return this; } @@ -728,14 +681,12 @@ public List getVolumeMounts() { return volumeMounts; } - public void setVolumeMounts(List volumeMounts) { this.volumeMounts = volumeMounts; } public V1EphemeralContainer workingDir(String workingDir) { - this.workingDir = workingDir; return this; } @@ -749,7 +700,6 @@ public String getWorkingDir() { return workingDir; } - public void setWorkingDir(String workingDir) { this.workingDir = workingDir; } @@ -880,38 +830,39 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1EphemeralContainer + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1EphemeralContainer */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1EphemeralContainer.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1EphemeralContainer.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1EphemeralContainer is not found in the empty JSON string", V1EphemeralContainer.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1EphemeralContainer.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1EphemeralContainer` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1EphemeralContainer` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1EphemeralContainer.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the optional json data is an array if present - if (jsonObj.get("args") != null && !jsonObj.get("args").isJsonArray()) { + if (jsonObj.get("args") != null && !jsonObj.get("args").isJsonNull() && !jsonObj.get("args").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `args` to be an array in the JSON string but got `%s`", jsonObj.get("args").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("command") != null && !jsonObj.get("command").isJsonArray()) { + if (jsonObj.get("command") != null && !jsonObj.get("command").isJsonNull() && !jsonObj.get("command").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `command` to be an array in the JSON string but got `%s`", jsonObj.get("command").toString())); } if (jsonObj.get("env") != null && !jsonObj.get("env").isJsonNull()) { @@ -924,7 +875,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `env` (array) for (int i = 0; i < jsonArrayenv.size(); i++) { - V1EnvVar.validateJsonObject(jsonArrayenv.get(i).getAsJsonObject()); + V1EnvVar.validateJsonElement(jsonArrayenv.get(i)); }; } } @@ -938,7 +889,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `envFrom` (array) for (int i = 0; i < jsonArrayenvFrom.size(); i++) { - V1EnvFromSource.validateJsonObject(jsonArrayenvFrom.get(i).getAsJsonObject()); + V1EnvFromSource.validateJsonElement(jsonArrayenvFrom.get(i)); }; } } @@ -950,11 +901,11 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `lifecycle` if (jsonObj.get("lifecycle") != null && !jsonObj.get("lifecycle").isJsonNull()) { - V1Lifecycle.validateJsonObject(jsonObj.getAsJsonObject("lifecycle")); + V1Lifecycle.validateJsonElement(jsonObj.get("lifecycle")); } // validate the optional field `livenessProbe` if (jsonObj.get("livenessProbe") != null && !jsonObj.get("livenessProbe").isJsonNull()) { - V1Probe.validateJsonObject(jsonObj.getAsJsonObject("livenessProbe")); + V1Probe.validateJsonElement(jsonObj.get("livenessProbe")); } if (!jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); @@ -969,13 +920,13 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `ports` (array) for (int i = 0; i < jsonArrayports.size(); i++) { - V1ContainerPort.validateJsonObject(jsonArrayports.get(i).getAsJsonObject()); + V1ContainerPort.validateJsonElement(jsonArrayports.get(i)); }; } } // validate the optional field `readinessProbe` if (jsonObj.get("readinessProbe") != null && !jsonObj.get("readinessProbe").isJsonNull()) { - V1Probe.validateJsonObject(jsonObj.getAsJsonObject("readinessProbe")); + V1Probe.validateJsonElement(jsonObj.get("readinessProbe")); } if (jsonObj.get("resizePolicy") != null && !jsonObj.get("resizePolicy").isJsonNull()) { JsonArray jsonArrayresizePolicy = jsonObj.getAsJsonArray("resizePolicy"); @@ -987,24 +938,24 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `resizePolicy` (array) for (int i = 0; i < jsonArrayresizePolicy.size(); i++) { - V1ContainerResizePolicy.validateJsonObject(jsonArrayresizePolicy.get(i).getAsJsonObject()); + V1ContainerResizePolicy.validateJsonElement(jsonArrayresizePolicy.get(i)); }; } } // validate the optional field `resources` if (jsonObj.get("resources") != null && !jsonObj.get("resources").isJsonNull()) { - V1ResourceRequirements.validateJsonObject(jsonObj.getAsJsonObject("resources")); + V1ResourceRequirements.validateJsonElement(jsonObj.get("resources")); } if ((jsonObj.get("restartPolicy") != null && !jsonObj.get("restartPolicy").isJsonNull()) && !jsonObj.get("restartPolicy").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `restartPolicy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("restartPolicy").toString())); } // validate the optional field `securityContext` if (jsonObj.get("securityContext") != null && !jsonObj.get("securityContext").isJsonNull()) { - V1SecurityContext.validateJsonObject(jsonObj.getAsJsonObject("securityContext")); + V1SecurityContext.validateJsonElement(jsonObj.get("securityContext")); } // validate the optional field `startupProbe` if (jsonObj.get("startupProbe") != null && !jsonObj.get("startupProbe").isJsonNull()) { - V1Probe.validateJsonObject(jsonObj.getAsJsonObject("startupProbe")); + V1Probe.validateJsonElement(jsonObj.get("startupProbe")); } if ((jsonObj.get("targetContainerName") != null && !jsonObj.get("targetContainerName").isJsonNull()) && !jsonObj.get("targetContainerName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `targetContainerName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("targetContainerName").toString())); @@ -1025,7 +976,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `volumeDevices` (array) for (int i = 0; i < jsonArrayvolumeDevices.size(); i++) { - V1VolumeDevice.validateJsonObject(jsonArrayvolumeDevices.get(i).getAsJsonObject()); + V1VolumeDevice.validateJsonElement(jsonArrayvolumeDevices.get(i)); }; } } @@ -1039,7 +990,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `volumeMounts` (array) for (int i = 0; i < jsonArrayvolumeMounts.size(); i++) { - V1VolumeMount.validateJsonObject(jsonArrayvolumeMounts.get(i).getAsJsonObject()); + V1VolumeMount.validateJsonElement(jsonArrayvolumeMounts.get(i)); }; } } @@ -1068,9 +1019,9 @@ public void write(JsonWriter out, V1EphemeralContainer value) throws IOException @Override public V1EphemeralContainer read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -1097,3 +1048,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1EphemeralVolumeSource.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1EphemeralVolumeSource.java index 596ca6afa6..41887d2e53 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1EphemeralVolumeSource.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1EphemeralVolumeSource.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.openapi.models.V1PersistentVolumeClaimTemplate; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * Represents an ephemeral volume that is handled by a normal storage driver. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1EphemeralVolumeSource { public static final String SERIALIZED_NAME_VOLUME_CLAIM_TEMPLATE = "volumeClaimTemplate"; @SerializedName(SERIALIZED_NAME_VOLUME_CLAIM_TEMPLATE) @@ -60,7 +60,6 @@ public V1EphemeralVolumeSource() { } public V1EphemeralVolumeSource volumeClaimTemplate(V1PersistentVolumeClaimTemplate volumeClaimTemplate) { - this.volumeClaimTemplate = volumeClaimTemplate; return this; } @@ -74,7 +73,6 @@ public V1PersistentVolumeClaimTemplate getVolumeClaimTemplate() { return volumeClaimTemplate; } - public void setVolumeClaimTemplate(V1PersistentVolumeClaimTemplate volumeClaimTemplate) { this.volumeClaimTemplate = volumeClaimTemplate; } @@ -132,28 +130,29 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1EphemeralVolumeSource + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1EphemeralVolumeSource */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1EphemeralVolumeSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1EphemeralVolumeSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1EphemeralVolumeSource is not found in the empty JSON string", V1EphemeralVolumeSource.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1EphemeralVolumeSource.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1EphemeralVolumeSource` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1EphemeralVolumeSource` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `volumeClaimTemplate` if (jsonObj.get("volumeClaimTemplate") != null && !jsonObj.get("volumeClaimTemplate").isJsonNull()) { - V1PersistentVolumeClaimTemplate.validateJsonObject(jsonObj.getAsJsonObject("volumeClaimTemplate")); + V1PersistentVolumeClaimTemplate.validateJsonElement(jsonObj.get("volumeClaimTemplate")); } } @@ -177,9 +176,9 @@ public void write(JsonWriter out, V1EphemeralVolumeSource value) throws IOExcept @Override public V1EphemeralVolumeSource read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -206,3 +205,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1EventSource.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1EventSource.java index 1d86dbff21..a41b6b4725 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1EventSource.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1EventSource.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * EventSource contains information for an event. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1EventSource { public static final String SERIALIZED_NAME_COMPONENT = "component"; @SerializedName(SERIALIZED_NAME_COMPONENT) @@ -63,7 +63,6 @@ public V1EventSource() { } public V1EventSource component(String component) { - this.component = component; return this; } @@ -77,14 +76,12 @@ public String getComponent() { return component; } - public void setComponent(String component) { this.component = component; } public V1EventSource host(String host) { - this.host = host; return this; } @@ -98,7 +95,6 @@ public String getHost() { return host; } - public void setHost(String host) { this.host = host; } @@ -159,25 +155,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1EventSource + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1EventSource */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1EventSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1EventSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1EventSource is not found in the empty JSON string", V1EventSource.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1EventSource.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1EventSource` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1EventSource` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("component") != null && !jsonObj.get("component").isJsonNull()) && !jsonObj.get("component").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `component` to be a primitive type in the JSON string but got `%s`", jsonObj.get("component").toString())); } @@ -206,9 +203,9 @@ public void write(JsonWriter out, V1EventSource value) throws IOException { @Override public V1EventSource read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -235,3 +232,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Eviction.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Eviction.java index 9b7bbdd651..df4a5a38d4 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Eviction.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Eviction.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1DeleteOptions; import io.kubernetes.client.openapi.models.V1ObjectMeta; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -43,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -51,7 +51,7 @@ /** * 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. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1Eviction implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -73,7 +73,6 @@ public V1Eviction() { } public V1Eviction apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -87,14 +86,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1Eviction deleteOptions(V1DeleteOptions deleteOptions) { - this.deleteOptions = deleteOptions; return this; } @@ -108,14 +105,12 @@ public V1DeleteOptions getDeleteOptions() { return deleteOptions; } - public void setDeleteOptions(V1DeleteOptions deleteOptions) { this.deleteOptions = deleteOptions; } public V1Eviction kind(String kind) { - this.kind = kind; return this; } @@ -129,14 +124,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1Eviction metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -150,7 +143,6 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } @@ -217,38 +209,39 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1Eviction + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1Eviction */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1Eviction.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1Eviction.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1Eviction is not found in the empty JSON string", V1Eviction.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1Eviction.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1Eviction` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1Eviction` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } // validate the optional field `deleteOptions` if (jsonObj.get("deleteOptions") != null && !jsonObj.get("deleteOptions").isJsonNull()) { - V1DeleteOptions.validateJsonObject(jsonObj.getAsJsonObject("deleteOptions")); + V1DeleteOptions.validateJsonElement(jsonObj.get("deleteOptions")); } if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } } @@ -272,9 +265,9 @@ public void write(JsonWriter out, V1Eviction value) throws IOException { @Override public V1Eviction read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -301,3 +294,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ExecAction.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ExecAction.java index 49f189b7a4..ddcac073c0 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ExecAction.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ExecAction.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -43,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -51,17 +51,16 @@ /** * ExecAction describes a \"run in container\" action. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ExecAction { public static final String SERIALIZED_NAME_COMMAND = "command"; @SerializedName(SERIALIZED_NAME_COMMAND) - private List command; + private List command = new ArrayList<>(); public V1ExecAction() { } public V1ExecAction command(List command) { - this.command = command; return this; } @@ -83,7 +82,6 @@ public List getCommand() { return command; } - public void setCommand(List command) { this.command = command; } @@ -141,27 +139,28 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ExecAction + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ExecAction */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ExecAction.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ExecAction.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ExecAction is not found in the empty JSON string", V1ExecAction.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ExecAction.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ExecAction` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ExecAction` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the optional json data is an array if present - if (jsonObj.get("command") != null && !jsonObj.get("command").isJsonArray()) { + if (jsonObj.get("command") != null && !jsonObj.get("command").isJsonNull() && !jsonObj.get("command").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `command` to be an array in the JSON string but got `%s`", jsonObj.get("command").toString())); } } @@ -186,9 +185,9 @@ public void write(JsonWriter out, V1ExecAction value) throws IOException { @Override public V1ExecAction read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -215,3 +214,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ExemptPriorityLevelConfiguration.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ExemptPriorityLevelConfiguration.java index 44d954a9d3..9951563ef8 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ExemptPriorityLevelConfiguration.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ExemptPriorityLevelConfiguration.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * ExemptPriorityLevelConfiguration describes the configurable aspects of the handling of exempt requests. In the mandatory exempt configuration object the values in the fields here can be modified by authorized users, unlike the rest of the `spec`. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ExemptPriorityLevelConfiguration { public static final String SERIALIZED_NAME_LENDABLE_PERCENT = "lendablePercent"; @SerializedName(SERIALIZED_NAME_LENDABLE_PERCENT) @@ -63,7 +63,6 @@ public V1ExemptPriorityLevelConfiguration() { } public V1ExemptPriorityLevelConfiguration lendablePercent(Integer lendablePercent) { - this.lendablePercent = lendablePercent; return this; } @@ -77,14 +76,12 @@ public Integer getLendablePercent() { return lendablePercent; } - public void setLendablePercent(Integer lendablePercent) { this.lendablePercent = lendablePercent; } public V1ExemptPriorityLevelConfiguration nominalConcurrencyShares(Integer nominalConcurrencyShares) { - this.nominalConcurrencyShares = nominalConcurrencyShares; return this; } @@ -98,7 +95,6 @@ public Integer getNominalConcurrencyShares() { return nominalConcurrencyShares; } - public void setNominalConcurrencyShares(Integer nominalConcurrencyShares) { this.nominalConcurrencyShares = nominalConcurrencyShares; } @@ -159,25 +155,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ExemptPriorityLevelConfiguration + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ExemptPriorityLevelConfiguration */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ExemptPriorityLevelConfiguration.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ExemptPriorityLevelConfiguration.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ExemptPriorityLevelConfiguration is not found in the empty JSON string", V1ExemptPriorityLevelConfiguration.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ExemptPriorityLevelConfiguration.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ExemptPriorityLevelConfiguration` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ExemptPriorityLevelConfiguration` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -200,9 +197,9 @@ public void write(JsonWriter out, V1ExemptPriorityLevelConfiguration value) thro @Override public V1ExemptPriorityLevelConfiguration read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -229,3 +226,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ExpressionWarning.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ExpressionWarning.java index 65402f6db3..79e04397e8 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ExpressionWarning.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ExpressionWarning.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * ExpressionWarning is a warning information that targets a specific expression. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ExpressionWarning { public static final String SERIALIZED_NAME_FIELD_REF = "fieldRef"; @SerializedName(SERIALIZED_NAME_FIELD_REF) @@ -63,7 +63,6 @@ public V1ExpressionWarning() { } public V1ExpressionWarning fieldRef(String fieldRef) { - this.fieldRef = fieldRef; return this; } @@ -77,14 +76,12 @@ public String getFieldRef() { return fieldRef; } - public void setFieldRef(String fieldRef) { this.fieldRef = fieldRef; } public V1ExpressionWarning warning(String warning) { - this.warning = warning; return this; } @@ -98,7 +95,6 @@ public String getWarning() { return warning; } - public void setWarning(String warning) { this.warning = warning; } @@ -161,32 +157,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ExpressionWarning + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ExpressionWarning */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ExpressionWarning.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ExpressionWarning.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ExpressionWarning is not found in the empty JSON string", V1ExpressionWarning.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ExpressionWarning.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ExpressionWarning` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ExpressionWarning` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1ExpressionWarning.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("fieldRef").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `fieldRef` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fieldRef").toString())); } @@ -215,9 +212,9 @@ public void write(JsonWriter out, V1ExpressionWarning value) throws IOException @Override public V1ExpressionWarning read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -244,3 +241,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ExternalDocumentation.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ExternalDocumentation.java index 483a9cac17..fe883524f8 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ExternalDocumentation.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ExternalDocumentation.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * ExternalDocumentation allows referencing an external resource for extended documentation. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ExternalDocumentation { public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) @@ -63,7 +63,6 @@ public V1ExternalDocumentation() { } public V1ExternalDocumentation description(String description) { - this.description = description; return this; } @@ -77,14 +76,12 @@ public String getDescription() { return description; } - public void setDescription(String description) { this.description = description; } public V1ExternalDocumentation url(String url) { - this.url = url; return this; } @@ -98,7 +95,6 @@ public String getUrl() { return url; } - public void setUrl(String url) { this.url = url; } @@ -159,25 +155,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ExternalDocumentation + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ExternalDocumentation */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ExternalDocumentation.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ExternalDocumentation.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ExternalDocumentation is not found in the empty JSON string", V1ExternalDocumentation.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ExternalDocumentation.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ExternalDocumentation` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ExternalDocumentation` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } @@ -206,9 +203,9 @@ public void write(JsonWriter out, V1ExternalDocumentation value) throws IOExcept @Override public V1ExternalDocumentation read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -235,3 +232,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1FCVolumeSource.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1FCVolumeSource.java index f281f1e5d4..f906693ca3 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1FCVolumeSource.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1FCVolumeSource.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -43,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -51,7 +51,7 @@ /** * 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. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1FCVolumeSource { public static final String SERIALIZED_NAME_FS_TYPE = "fsType"; @SerializedName(SERIALIZED_NAME_FS_TYPE) @@ -67,17 +67,16 @@ public class V1FCVolumeSource { public static final String SERIALIZED_NAME_TARGET_W_W_NS = "targetWWNs"; @SerializedName(SERIALIZED_NAME_TARGET_W_W_NS) - private List targetWWNs; + private List targetWWNs = new ArrayList<>(); public static final String SERIALIZED_NAME_WWIDS = "wwids"; @SerializedName(SERIALIZED_NAME_WWIDS) - private List wwids; + private List wwids = new ArrayList<>(); public V1FCVolumeSource() { } public V1FCVolumeSource fsType(String fsType) { - this.fsType = fsType; return this; } @@ -91,14 +90,12 @@ public String getFsType() { return fsType; } - public void setFsType(String fsType) { this.fsType = fsType; } public V1FCVolumeSource lun(Integer lun) { - this.lun = lun; return this; } @@ -112,14 +109,12 @@ public Integer getLun() { return lun; } - public void setLun(Integer lun) { this.lun = lun; } public V1FCVolumeSource readOnly(Boolean readOnly) { - this.readOnly = readOnly; return this; } @@ -133,14 +128,12 @@ public Boolean getReadOnly() { return readOnly; } - public void setReadOnly(Boolean readOnly) { this.readOnly = readOnly; } public V1FCVolumeSource targetWWNs(List targetWWNs) { - this.targetWWNs = targetWWNs; return this; } @@ -162,14 +155,12 @@ public List getTargetWWNs() { return targetWWNs; } - public void setTargetWWNs(List targetWWNs) { this.targetWWNs = targetWWNs; } public V1FCVolumeSource wwids(List wwids) { - this.wwids = wwids; return this; } @@ -191,7 +182,6 @@ public List getWwids() { return wwids; } - public void setWwids(List wwids) { this.wwids = wwids; } @@ -261,34 +251,35 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1FCVolumeSource + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1FCVolumeSource */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1FCVolumeSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1FCVolumeSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1FCVolumeSource is not found in the empty JSON string", V1FCVolumeSource.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1FCVolumeSource.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1FCVolumeSource` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1FCVolumeSource` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("fsType") != null && !jsonObj.get("fsType").isJsonNull()) && !jsonObj.get("fsType").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `fsType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fsType").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("targetWWNs") != null && !jsonObj.get("targetWWNs").isJsonArray()) { + if (jsonObj.get("targetWWNs") != null && !jsonObj.get("targetWWNs").isJsonNull() && !jsonObj.get("targetWWNs").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `targetWWNs` to be an array in the JSON string but got `%s`", jsonObj.get("targetWWNs").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("wwids") != null && !jsonObj.get("wwids").isJsonArray()) { + if (jsonObj.get("wwids") != null && !jsonObj.get("wwids").isJsonNull() && !jsonObj.get("wwids").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `wwids` to be an array in the JSON string but got `%s`", jsonObj.get("wwids").toString())); } } @@ -313,9 +304,9 @@ public void write(JsonWriter out, V1FCVolumeSource value) throws IOException { @Override public V1FCVolumeSource read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -342,3 +333,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1FlexPersistentVolumeSource.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1FlexPersistentVolumeSource.java index 973db3705b..10510485f4 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1FlexPersistentVolumeSource.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1FlexPersistentVolumeSource.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.openapi.models.V1SecretReference; import java.io.IOException; +import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * FlexPersistentVolumeSource represents a generic persistent volume resource that is provisioned/attached using an exec based plugin. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1FlexPersistentVolumeSource { public static final String SERIALIZED_NAME_DRIVER = "driver"; @SerializedName(SERIALIZED_NAME_DRIVER) @@ -78,7 +78,6 @@ public V1FlexPersistentVolumeSource() { } public V1FlexPersistentVolumeSource driver(String driver) { - this.driver = driver; return this; } @@ -92,14 +91,12 @@ public String getDriver() { return driver; } - public void setDriver(String driver) { this.driver = driver; } public V1FlexPersistentVolumeSource fsType(String fsType) { - this.fsType = fsType; return this; } @@ -113,14 +110,12 @@ public String getFsType() { return fsType; } - public void setFsType(String fsType) { this.fsType = fsType; } public V1FlexPersistentVolumeSource options(Map options) { - this.options = options; return this; } @@ -142,14 +137,12 @@ public Map getOptions() { return options; } - public void setOptions(Map options) { this.options = options; } public V1FlexPersistentVolumeSource readOnly(Boolean readOnly) { - this.readOnly = readOnly; return this; } @@ -163,14 +156,12 @@ public Boolean getReadOnly() { return readOnly; } - public void setReadOnly(Boolean readOnly) { this.readOnly = readOnly; } public V1FlexPersistentVolumeSource secretRef(V1SecretReference secretRef) { - this.secretRef = secretRef; return this; } @@ -184,7 +175,6 @@ public V1SecretReference getSecretRef() { return secretRef; } - public void setSecretRef(V1SecretReference secretRef) { this.secretRef = secretRef; } @@ -255,32 +245,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1FlexPersistentVolumeSource + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1FlexPersistentVolumeSource */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1FlexPersistentVolumeSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1FlexPersistentVolumeSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1FlexPersistentVolumeSource is not found in the empty JSON string", V1FlexPersistentVolumeSource.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1FlexPersistentVolumeSource.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1FlexPersistentVolumeSource` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1FlexPersistentVolumeSource` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1FlexPersistentVolumeSource.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("driver").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `driver` to be a primitive type in the JSON string but got `%s`", jsonObj.get("driver").toString())); } @@ -289,7 +280,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `secretRef` if (jsonObj.get("secretRef") != null && !jsonObj.get("secretRef").isJsonNull()) { - V1SecretReference.validateJsonObject(jsonObj.getAsJsonObject("secretRef")); + V1SecretReference.validateJsonElement(jsonObj.get("secretRef")); } } @@ -313,9 +304,9 @@ public void write(JsonWriter out, V1FlexPersistentVolumeSource value) throws IOE @Override public V1FlexPersistentVolumeSource read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -342,3 +333,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1FlexVolumeSource.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1FlexVolumeSource.java index d101cb4a31..002e0ba054 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1FlexVolumeSource.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1FlexVolumeSource.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.openapi.models.V1LocalObjectReference; import java.io.IOException; +import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1FlexVolumeSource { public static final String SERIALIZED_NAME_DRIVER = "driver"; @SerializedName(SERIALIZED_NAME_DRIVER) @@ -78,7 +78,6 @@ public V1FlexVolumeSource() { } public V1FlexVolumeSource driver(String driver) { - this.driver = driver; return this; } @@ -92,14 +91,12 @@ public String getDriver() { return driver; } - public void setDriver(String driver) { this.driver = driver; } public V1FlexVolumeSource fsType(String fsType) { - this.fsType = fsType; return this; } @@ -113,14 +110,12 @@ public String getFsType() { return fsType; } - public void setFsType(String fsType) { this.fsType = fsType; } public V1FlexVolumeSource options(Map options) { - this.options = options; return this; } @@ -142,14 +137,12 @@ public Map getOptions() { return options; } - public void setOptions(Map options) { this.options = options; } public V1FlexVolumeSource readOnly(Boolean readOnly) { - this.readOnly = readOnly; return this; } @@ -163,14 +156,12 @@ public Boolean getReadOnly() { return readOnly; } - public void setReadOnly(Boolean readOnly) { this.readOnly = readOnly; } public V1FlexVolumeSource secretRef(V1LocalObjectReference secretRef) { - this.secretRef = secretRef; return this; } @@ -184,7 +175,6 @@ public V1LocalObjectReference getSecretRef() { return secretRef; } - public void setSecretRef(V1LocalObjectReference secretRef) { this.secretRef = secretRef; } @@ -255,32 +245,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1FlexVolumeSource + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1FlexVolumeSource */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1FlexVolumeSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1FlexVolumeSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1FlexVolumeSource is not found in the empty JSON string", V1FlexVolumeSource.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1FlexVolumeSource.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1FlexVolumeSource` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1FlexVolumeSource` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1FlexVolumeSource.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("driver").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `driver` to be a primitive type in the JSON string but got `%s`", jsonObj.get("driver").toString())); } @@ -289,7 +280,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `secretRef` if (jsonObj.get("secretRef") != null && !jsonObj.get("secretRef").isJsonNull()) { - V1LocalObjectReference.validateJsonObject(jsonObj.getAsJsonObject("secretRef")); + V1LocalObjectReference.validateJsonElement(jsonObj.get("secretRef")); } } @@ -313,9 +304,9 @@ public void write(JsonWriter out, V1FlexVolumeSource value) throws IOException { @Override public V1FlexVolumeSource read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -342,3 +333,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1FlockerVolumeSource.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1FlockerVolumeSource.java index 20cfe02478..a496aef6f9 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1FlockerVolumeSource.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1FlockerVolumeSource.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * 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. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1FlockerVolumeSource { public static final String SERIALIZED_NAME_DATASET_NAME = "datasetName"; @SerializedName(SERIALIZED_NAME_DATASET_NAME) @@ -63,7 +63,6 @@ public V1FlockerVolumeSource() { } public V1FlockerVolumeSource datasetName(String datasetName) { - this.datasetName = datasetName; return this; } @@ -77,14 +76,12 @@ public String getDatasetName() { return datasetName; } - public void setDatasetName(String datasetName) { this.datasetName = datasetName; } public V1FlockerVolumeSource datasetUUID(String datasetUUID) { - this.datasetUUID = datasetUUID; return this; } @@ -98,7 +95,6 @@ public String getDatasetUUID() { return datasetUUID; } - public void setDatasetUUID(String datasetUUID) { this.datasetUUID = datasetUUID; } @@ -159,25 +155,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1FlockerVolumeSource + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1FlockerVolumeSource */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1FlockerVolumeSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1FlockerVolumeSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1FlockerVolumeSource is not found in the empty JSON string", V1FlockerVolumeSource.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1FlockerVolumeSource.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1FlockerVolumeSource` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1FlockerVolumeSource` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("datasetName") != null && !jsonObj.get("datasetName").isJsonNull()) && !jsonObj.get("datasetName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `datasetName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("datasetName").toString())); } @@ -206,9 +203,9 @@ public void write(JsonWriter out, V1FlockerVolumeSource value) throws IOExceptio @Override public V1FlockerVolumeSource read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -235,3 +232,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1FlowDistinguisherMethod.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1FlowDistinguisherMethod.java index 5996d408ac..8330d46086 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1FlowDistinguisherMethod.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1FlowDistinguisherMethod.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * FlowDistinguisherMethod specifies the method of a flow distinguisher. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1FlowDistinguisherMethod { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) @@ -59,7 +59,6 @@ public V1FlowDistinguisherMethod() { } public V1FlowDistinguisherMethod type(String type) { - this.type = type; return this; } @@ -73,7 +72,6 @@ public String getType() { return type; } - public void setType(String type) { this.type = type; } @@ -132,32 +130,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1FlowDistinguisherMethod + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1FlowDistinguisherMethod */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1FlowDistinguisherMethod.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1FlowDistinguisherMethod.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1FlowDistinguisherMethod is not found in the empty JSON string", V1FlowDistinguisherMethod.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1FlowDistinguisherMethod.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1FlowDistinguisherMethod` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1FlowDistinguisherMethod` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1FlowDistinguisherMethod.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } @@ -183,9 +182,9 @@ public void write(JsonWriter out, V1FlowDistinguisherMethod value) throws IOExce @Override public V1FlowDistinguisherMethod read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -212,3 +211,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1FlowSchema.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1FlowSchema.java index d712ad06f0..1feafa9f32 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1FlowSchema.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1FlowSchema.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1FlowSchemaStatus; import io.kubernetes.client.openapi.models.V1ObjectMeta; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * FlowSchema defines the schema of a group of flows. Note that a flow is made up of a set of inbound API requests with similar attributes and is identified by a pair of strings: the name of the FlowSchema and a \"flow distinguisher\". */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1FlowSchema implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -78,7 +78,6 @@ public V1FlowSchema() { } public V1FlowSchema apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -92,14 +91,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1FlowSchema kind(String kind) { - this.kind = kind; return this; } @@ -113,14 +110,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1FlowSchema metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -134,14 +129,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V1FlowSchema spec(V1FlowSchemaSpec spec) { - this.spec = spec; return this; } @@ -155,14 +148,12 @@ public V1FlowSchemaSpec getSpec() { return spec; } - public void setSpec(V1FlowSchemaSpec spec) { this.spec = spec; } public V1FlowSchema status(V1FlowSchemaStatus status) { - this.status = status; return this; } @@ -176,7 +167,6 @@ public V1FlowSchemaStatus getStatus() { return status; } - public void setStatus(V1FlowSchemaStatus status) { this.status = status; } @@ -246,25 +236,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1FlowSchema + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1FlowSchema */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1FlowSchema.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1FlowSchema.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1FlowSchema is not found in the empty JSON string", V1FlowSchema.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1FlowSchema.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1FlowSchema` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1FlowSchema` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -273,15 +264,15 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } // validate the optional field `spec` if (jsonObj.get("spec") != null && !jsonObj.get("spec").isJsonNull()) { - V1FlowSchemaSpec.validateJsonObject(jsonObj.getAsJsonObject("spec")); + V1FlowSchemaSpec.validateJsonElement(jsonObj.get("spec")); } // validate the optional field `status` if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { - V1FlowSchemaStatus.validateJsonObject(jsonObj.getAsJsonObject("status")); + V1FlowSchemaStatus.validateJsonElement(jsonObj.get("status")); } } @@ -305,9 +296,9 @@ public void write(JsonWriter out, V1FlowSchema value) throws IOException { @Override public V1FlowSchema read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -334,3 +325,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1FlowSchemaCondition.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1FlowSchemaCondition.java index c9a9001bf6..b868c1300e 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1FlowSchemaCondition.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1FlowSchemaCondition.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * FlowSchemaCondition describes conditions for a FlowSchema. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1FlowSchemaCondition { public static final String SERIALIZED_NAME_LAST_TRANSITION_TIME = "lastTransitionTime"; @SerializedName(SERIALIZED_NAME_LAST_TRANSITION_TIME) @@ -76,7 +76,6 @@ public V1FlowSchemaCondition() { } public V1FlowSchemaCondition lastTransitionTime(OffsetDateTime lastTransitionTime) { - this.lastTransitionTime = lastTransitionTime; return this; } @@ -90,14 +89,12 @@ public OffsetDateTime getLastTransitionTime() { return lastTransitionTime; } - public void setLastTransitionTime(OffsetDateTime lastTransitionTime) { this.lastTransitionTime = lastTransitionTime; } public V1FlowSchemaCondition message(String message) { - this.message = message; return this; } @@ -111,14 +108,12 @@ public String getMessage() { return message; } - public void setMessage(String message) { this.message = message; } public V1FlowSchemaCondition reason(String reason) { - this.reason = reason; return this; } @@ -132,14 +127,12 @@ public String getReason() { return reason; } - public void setReason(String reason) { this.reason = reason; } public V1FlowSchemaCondition status(String status) { - this.status = status; return this; } @@ -153,14 +146,12 @@ public String getStatus() { return status; } - public void setStatus(String status) { this.status = status; } public V1FlowSchemaCondition type(String type) { - this.type = type; return this; } @@ -174,7 +165,6 @@ public String getType() { return type; } - public void setType(String type) { this.type = type; } @@ -244,25 +234,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1FlowSchemaCondition + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1FlowSchemaCondition */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1FlowSchemaCondition.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1FlowSchemaCondition.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1FlowSchemaCondition is not found in the empty JSON string", V1FlowSchemaCondition.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1FlowSchemaCondition.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1FlowSchemaCondition` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1FlowSchemaCondition` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); } @@ -297,9 +288,9 @@ public void write(JsonWriter out, V1FlowSchemaCondition value) throws IOExceptio @Override public V1FlowSchemaCondition read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -326,3 +317,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1FlowSchemaList.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1FlowSchemaList.java index e677cb4ff7..452dae7334 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1FlowSchemaList.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1FlowSchemaList.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1ListMeta; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * FlowSchemaList is a list of FlowSchema objects. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1FlowSchemaList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -75,7 +75,6 @@ public V1FlowSchemaList() { } public V1FlowSchemaList apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -89,14 +88,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1FlowSchemaList items(List items) { - this.items = items; return this; } @@ -118,14 +115,12 @@ public List getItems() { return items; } - public void setItems(List items) { this.items = items; } public V1FlowSchemaList kind(String kind) { - this.kind = kind; return this; } @@ -139,14 +134,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1FlowSchemaList metadata(V1ListMeta metadata) { - this.metadata = metadata; return this; } @@ -160,7 +153,6 @@ public V1ListMeta getMetadata() { return metadata; } - public void setMetadata(V1ListMeta metadata) { this.metadata = metadata; } @@ -228,32 +220,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1FlowSchemaList + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1FlowSchemaList */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1FlowSchemaList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1FlowSchemaList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1FlowSchemaList is not found in the empty JSON string", V1FlowSchemaList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1FlowSchemaList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1FlowSchemaList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1FlowSchemaList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1FlowSchemaList.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -265,14 +258,14 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); // validate the required field `items` (array) for (int i = 0; i < jsonArrayitems.size(); i++) { - V1FlowSchema.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject()); + V1FlowSchema.validateJsonElement(jsonArrayitems.get(i)); }; if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ListMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ListMeta.validateJsonElement(jsonObj.get("metadata")); } } @@ -296,9 +289,9 @@ public void write(JsonWriter out, V1FlowSchemaList value) throws IOException { @Override public V1FlowSchemaList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -325,3 +318,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1FlowSchemaSpec.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1FlowSchemaSpec.java index 31dd77ea00..3fcc1ab358 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1FlowSchemaSpec.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1FlowSchemaSpec.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -24,6 +24,7 @@ import io.kubernetes.client.openapi.models.V1PriorityLevelConfigurationReference; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -46,7 +47,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -54,7 +54,7 @@ /** * FlowSchemaSpec describes how the FlowSchema's specification looks like. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1FlowSchemaSpec { public static final String SERIALIZED_NAME_DISTINGUISHER_METHOD = "distinguisherMethod"; @SerializedName(SERIALIZED_NAME_DISTINGUISHER_METHOD) @@ -70,13 +70,12 @@ public class V1FlowSchemaSpec { public static final String SERIALIZED_NAME_RULES = "rules"; @SerializedName(SERIALIZED_NAME_RULES) - private List rules; + private List rules = new ArrayList<>(); public V1FlowSchemaSpec() { } public V1FlowSchemaSpec distinguisherMethod(V1FlowDistinguisherMethod distinguisherMethod) { - this.distinguisherMethod = distinguisherMethod; return this; } @@ -90,14 +89,12 @@ public V1FlowDistinguisherMethod getDistinguisherMethod() { return distinguisherMethod; } - public void setDistinguisherMethod(V1FlowDistinguisherMethod distinguisherMethod) { this.distinguisherMethod = distinguisherMethod; } public V1FlowSchemaSpec matchingPrecedence(Integer matchingPrecedence) { - this.matchingPrecedence = matchingPrecedence; return this; } @@ -111,14 +108,12 @@ public Integer getMatchingPrecedence() { return matchingPrecedence; } - public void setMatchingPrecedence(Integer matchingPrecedence) { this.matchingPrecedence = matchingPrecedence; } public V1FlowSchemaSpec priorityLevelConfiguration(V1PriorityLevelConfigurationReference priorityLevelConfiguration) { - this.priorityLevelConfiguration = priorityLevelConfiguration; return this; } @@ -132,14 +127,12 @@ public V1PriorityLevelConfigurationReference getPriorityLevelConfiguration() { return priorityLevelConfiguration; } - public void setPriorityLevelConfiguration(V1PriorityLevelConfigurationReference priorityLevelConfiguration) { this.priorityLevelConfiguration = priorityLevelConfiguration; } public V1FlowSchemaSpec rules(List rules) { - this.rules = rules; return this; } @@ -161,7 +154,6 @@ public List getRules() { return rules; } - public void setRules(List rules) { this.rules = rules; } @@ -229,38 +221,39 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1FlowSchemaSpec + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1FlowSchemaSpec */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1FlowSchemaSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1FlowSchemaSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1FlowSchemaSpec is not found in the empty JSON string", V1FlowSchemaSpec.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1FlowSchemaSpec.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1FlowSchemaSpec` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1FlowSchemaSpec` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1FlowSchemaSpec.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `distinguisherMethod` if (jsonObj.get("distinguisherMethod") != null && !jsonObj.get("distinguisherMethod").isJsonNull()) { - V1FlowDistinguisherMethod.validateJsonObject(jsonObj.getAsJsonObject("distinguisherMethod")); + V1FlowDistinguisherMethod.validateJsonElement(jsonObj.get("distinguisherMethod")); } // validate the required field `priorityLevelConfiguration` - V1PriorityLevelConfigurationReference.validateJsonObject(jsonObj.getAsJsonObject("priorityLevelConfiguration")); + V1PriorityLevelConfigurationReference.validateJsonElement(jsonObj.get("priorityLevelConfiguration")); if (jsonObj.get("rules") != null && !jsonObj.get("rules").isJsonNull()) { JsonArray jsonArrayrules = jsonObj.getAsJsonArray("rules"); if (jsonArrayrules != null) { @@ -271,7 +264,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `rules` (array) for (int i = 0; i < jsonArrayrules.size(); i++) { - V1PolicyRulesWithSubjects.validateJsonObject(jsonArrayrules.get(i).getAsJsonObject()); + V1PolicyRulesWithSubjects.validateJsonElement(jsonArrayrules.get(i)); }; } } @@ -297,9 +290,9 @@ public void write(JsonWriter out, V1FlowSchemaSpec value) throws IOException { @Override public V1FlowSchemaSpec read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -326,3 +319,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1FlowSchemaStatus.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1FlowSchemaStatus.java index 1e2ecbe84d..8d956f4524 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1FlowSchemaStatus.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1FlowSchemaStatus.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1FlowSchemaCondition; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,17 +52,16 @@ /** * FlowSchemaStatus represents the current state of a FlowSchema. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1FlowSchemaStatus { public static final String SERIALIZED_NAME_CONDITIONS = "conditions"; @SerializedName(SERIALIZED_NAME_CONDITIONS) - private List conditions; + private List conditions = new ArrayList<>(); public V1FlowSchemaStatus() { } public V1FlowSchemaStatus conditions(List conditions) { - this.conditions = conditions; return this; } @@ -84,7 +83,6 @@ public List getConditions() { return conditions; } - public void setConditions(List conditions) { this.conditions = conditions; } @@ -142,25 +140,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1FlowSchemaStatus + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1FlowSchemaStatus */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1FlowSchemaStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1FlowSchemaStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1FlowSchemaStatus is not found in the empty JSON string", V1FlowSchemaStatus.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1FlowSchemaStatus.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1FlowSchemaStatus` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1FlowSchemaStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (jsonObj.get("conditions") != null && !jsonObj.get("conditions").isJsonNull()) { JsonArray jsonArrayconditions = jsonObj.getAsJsonArray("conditions"); if (jsonArrayconditions != null) { @@ -171,7 +170,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `conditions` (array) for (int i = 0; i < jsonArrayconditions.size(); i++) { - V1FlowSchemaCondition.validateJsonObject(jsonArrayconditions.get(i).getAsJsonObject()); + V1FlowSchemaCondition.validateJsonElement(jsonArrayconditions.get(i)); }; } } @@ -197,9 +196,9 @@ public void write(JsonWriter out, V1FlowSchemaStatus value) throws IOException { @Override public V1FlowSchemaStatus read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -226,3 +225,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ForZone.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ForZone.java index 281068b3bd..82ac7be909 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ForZone.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ForZone.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * ForZone provides information about which zones should consume this endpoint. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ForZone { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) @@ -59,7 +59,6 @@ public V1ForZone() { } public V1ForZone name(String name) { - this.name = name; return this; } @@ -73,7 +72,6 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } @@ -132,32 +130,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ForZone + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ForZone */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ForZone.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ForZone.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ForZone is not found in the empty JSON string", V1ForZone.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ForZone.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ForZone` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ForZone` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1ForZone.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } @@ -183,9 +182,9 @@ public void write(JsonWriter out, V1ForZone value) throws IOException { @Override public V1ForZone read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -212,3 +211,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1GCEPersistentDiskVolumeSource.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1GCEPersistentDiskVolumeSource.java index 44a7f3bb49..3fd9183969 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1GCEPersistentDiskVolumeSource.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1GCEPersistentDiskVolumeSource.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * 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. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1GCEPersistentDiskVolumeSource { public static final String SERIALIZED_NAME_FS_TYPE = "fsType"; @SerializedName(SERIALIZED_NAME_FS_TYPE) @@ -71,7 +71,6 @@ public V1GCEPersistentDiskVolumeSource() { } public V1GCEPersistentDiskVolumeSource fsType(String fsType) { - this.fsType = fsType; return this; } @@ -85,14 +84,12 @@ public String getFsType() { return fsType; } - public void setFsType(String fsType) { this.fsType = fsType; } public V1GCEPersistentDiskVolumeSource partition(Integer partition) { - this.partition = partition; return this; } @@ -106,14 +103,12 @@ public Integer getPartition() { return partition; } - public void setPartition(Integer partition) { this.partition = partition; } public V1GCEPersistentDiskVolumeSource pdName(String pdName) { - this.pdName = pdName; return this; } @@ -127,14 +122,12 @@ public String getPdName() { return pdName; } - public void setPdName(String pdName) { this.pdName = pdName; } public V1GCEPersistentDiskVolumeSource readOnly(Boolean readOnly) { - this.readOnly = readOnly; return this; } @@ -148,7 +141,6 @@ public Boolean getReadOnly() { return readOnly; } - public void setReadOnly(Boolean readOnly) { this.readOnly = readOnly; } @@ -216,32 +208,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1GCEPersistentDiskVolumeSource + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1GCEPersistentDiskVolumeSource */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1GCEPersistentDiskVolumeSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1GCEPersistentDiskVolumeSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1GCEPersistentDiskVolumeSource is not found in the empty JSON string", V1GCEPersistentDiskVolumeSource.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1GCEPersistentDiskVolumeSource.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1GCEPersistentDiskVolumeSource` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1GCEPersistentDiskVolumeSource` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1GCEPersistentDiskVolumeSource.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("fsType") != null && !jsonObj.get("fsType").isJsonNull()) && !jsonObj.get("fsType").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `fsType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fsType").toString())); } @@ -270,9 +263,9 @@ public void write(JsonWriter out, V1GCEPersistentDiskVolumeSource value) throws @Override public V1GCEPersistentDiskVolumeSource read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -299,3 +292,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1GRPCAction.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1GRPCAction.java index dda600c9aa..f5ad496ea5 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1GRPCAction.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1GRPCAction.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * V1GRPCAction */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1GRPCAction { public static final String SERIALIZED_NAME_PORT = "port"; @SerializedName(SERIALIZED_NAME_PORT) @@ -63,7 +63,6 @@ public V1GRPCAction() { } public V1GRPCAction port(Integer port) { - this.port = port; return this; } @@ -77,14 +76,12 @@ public Integer getPort() { return port; } - public void setPort(Integer port) { this.port = port; } public V1GRPCAction service(String service) { - this.service = service; return this; } @@ -98,7 +95,6 @@ public String getService() { return service; } - public void setService(String service) { this.service = service; } @@ -160,32 +156,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1GRPCAction + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1GRPCAction */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1GRPCAction.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1GRPCAction.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1GRPCAction is not found in the empty JSON string", V1GRPCAction.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1GRPCAction.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1GRPCAction` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1GRPCAction` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1GRPCAction.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("service") != null && !jsonObj.get("service").isJsonNull()) && !jsonObj.get("service").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `service` to be a primitive type in the JSON string but got `%s`", jsonObj.get("service").toString())); } @@ -211,9 +208,9 @@ public void write(JsonWriter out, V1GRPCAction value) throws IOException { @Override public V1GRPCAction read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -240,3 +237,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1GitRepoVolumeSource.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1GitRepoVolumeSource.java index d33fd46928..d4449582c3 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1GitRepoVolumeSource.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1GitRepoVolumeSource.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * 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. DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod's container. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1GitRepoVolumeSource { public static final String SERIALIZED_NAME_DIRECTORY = "directory"; @SerializedName(SERIALIZED_NAME_DIRECTORY) @@ -67,7 +67,6 @@ public V1GitRepoVolumeSource() { } public V1GitRepoVolumeSource directory(String directory) { - this.directory = directory; return this; } @@ -81,14 +80,12 @@ public String getDirectory() { return directory; } - public void setDirectory(String directory) { this.directory = directory; } public V1GitRepoVolumeSource repository(String repository) { - this.repository = repository; return this; } @@ -102,14 +99,12 @@ public String getRepository() { return repository; } - public void setRepository(String repository) { this.repository = repository; } public V1GitRepoVolumeSource revision(String revision) { - this.revision = revision; return this; } @@ -123,7 +118,6 @@ public String getRevision() { return revision; } - public void setRevision(String revision) { this.revision = revision; } @@ -188,32 +182,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1GitRepoVolumeSource + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1GitRepoVolumeSource */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1GitRepoVolumeSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1GitRepoVolumeSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1GitRepoVolumeSource is not found in the empty JSON string", V1GitRepoVolumeSource.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1GitRepoVolumeSource.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1GitRepoVolumeSource` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1GitRepoVolumeSource` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1GitRepoVolumeSource.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("directory") != null && !jsonObj.get("directory").isJsonNull()) && !jsonObj.get("directory").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `directory` to be a primitive type in the JSON string but got `%s`", jsonObj.get("directory").toString())); } @@ -245,9 +240,9 @@ public void write(JsonWriter out, V1GitRepoVolumeSource value) throws IOExceptio @Override public V1GitRepoVolumeSource read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -274,3 +269,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1GlusterfsPersistentVolumeSource.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1GlusterfsPersistentVolumeSource.java index 08dbce02b2..9b2c913679 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1GlusterfsPersistentVolumeSource.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1GlusterfsPersistentVolumeSource.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * Represents a Glusterfs mount that lasts the lifetime of a pod. Glusterfs volumes do not support ownership management or SELinux relabeling. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1GlusterfsPersistentVolumeSource { public static final String SERIALIZED_NAME_ENDPOINTS = "endpoints"; @SerializedName(SERIALIZED_NAME_ENDPOINTS) @@ -71,7 +71,6 @@ public V1GlusterfsPersistentVolumeSource() { } public V1GlusterfsPersistentVolumeSource endpoints(String endpoints) { - this.endpoints = endpoints; return this; } @@ -85,14 +84,12 @@ public String getEndpoints() { return endpoints; } - public void setEndpoints(String endpoints) { this.endpoints = endpoints; } public V1GlusterfsPersistentVolumeSource endpointsNamespace(String endpointsNamespace) { - this.endpointsNamespace = endpointsNamespace; return this; } @@ -106,14 +103,12 @@ public String getEndpointsNamespace() { return endpointsNamespace; } - public void setEndpointsNamespace(String endpointsNamespace) { this.endpointsNamespace = endpointsNamespace; } public V1GlusterfsPersistentVolumeSource path(String path) { - this.path = path; return this; } @@ -127,14 +122,12 @@ public String getPath() { return path; } - public void setPath(String path) { this.path = path; } public V1GlusterfsPersistentVolumeSource readOnly(Boolean readOnly) { - this.readOnly = readOnly; return this; } @@ -148,7 +141,6 @@ public Boolean getReadOnly() { return readOnly; } - public void setReadOnly(Boolean readOnly) { this.readOnly = readOnly; } @@ -217,32 +209,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1GlusterfsPersistentVolumeSource + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1GlusterfsPersistentVolumeSource */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1GlusterfsPersistentVolumeSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1GlusterfsPersistentVolumeSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1GlusterfsPersistentVolumeSource is not found in the empty JSON string", V1GlusterfsPersistentVolumeSource.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1GlusterfsPersistentVolumeSource.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1GlusterfsPersistentVolumeSource` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1GlusterfsPersistentVolumeSource` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1GlusterfsPersistentVolumeSource.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("endpoints").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `endpoints` to be a primitive type in the JSON string but got `%s`", jsonObj.get("endpoints").toString())); } @@ -274,9 +267,9 @@ public void write(JsonWriter out, V1GlusterfsPersistentVolumeSource value) throw @Override public V1GlusterfsPersistentVolumeSource read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -303,3 +296,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1GlusterfsVolumeSource.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1GlusterfsVolumeSource.java index 0e6bb404dc..6806cf8ba3 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1GlusterfsVolumeSource.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1GlusterfsVolumeSource.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * Represents a Glusterfs mount that lasts the lifetime of a pod. Glusterfs volumes do not support ownership management or SELinux relabeling. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1GlusterfsVolumeSource { public static final String SERIALIZED_NAME_ENDPOINTS = "endpoints"; @SerializedName(SERIALIZED_NAME_ENDPOINTS) @@ -67,7 +67,6 @@ public V1GlusterfsVolumeSource() { } public V1GlusterfsVolumeSource endpoints(String endpoints) { - this.endpoints = endpoints; return this; } @@ -81,14 +80,12 @@ public String getEndpoints() { return endpoints; } - public void setEndpoints(String endpoints) { this.endpoints = endpoints; } public V1GlusterfsVolumeSource path(String path) { - this.path = path; return this; } @@ -102,14 +99,12 @@ public String getPath() { return path; } - public void setPath(String path) { this.path = path; } public V1GlusterfsVolumeSource readOnly(Boolean readOnly) { - this.readOnly = readOnly; return this; } @@ -123,7 +118,6 @@ public Boolean getReadOnly() { return readOnly; } - public void setReadOnly(Boolean readOnly) { this.readOnly = readOnly; } @@ -189,32 +183,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1GlusterfsVolumeSource + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1GlusterfsVolumeSource */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1GlusterfsVolumeSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1GlusterfsVolumeSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1GlusterfsVolumeSource is not found in the empty JSON string", V1GlusterfsVolumeSource.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1GlusterfsVolumeSource.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1GlusterfsVolumeSource` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1GlusterfsVolumeSource` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1GlusterfsVolumeSource.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("endpoints").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `endpoints` to be a primitive type in the JSON string but got `%s`", jsonObj.get("endpoints").toString())); } @@ -243,9 +238,9 @@ public void write(JsonWriter out, V1GlusterfsVolumeSource value) throws IOExcept @Override public V1GlusterfsVolumeSource read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -272,3 +267,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1GroupSubject.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1GroupSubject.java index 88cfa58a33..7ea3ee8bad 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1GroupSubject.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1GroupSubject.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * GroupSubject holds detailed information for group-kind subject. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1GroupSubject { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) @@ -59,7 +59,6 @@ public V1GroupSubject() { } public V1GroupSubject name(String name) { - this.name = name; return this; } @@ -73,7 +72,6 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } @@ -132,32 +130,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1GroupSubject + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1GroupSubject */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1GroupSubject.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1GroupSubject.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1GroupSubject is not found in the empty JSON string", V1GroupSubject.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1GroupSubject.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1GroupSubject` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1GroupSubject` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1GroupSubject.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } @@ -183,9 +182,9 @@ public void write(JsonWriter out, V1GroupSubject value) throws IOException { @Override public V1GroupSubject read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -212,3 +211,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1GroupVersionForDiscovery.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1GroupVersionForDiscovery.java index b0851daa84..030d8c9564 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1GroupVersionForDiscovery.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1GroupVersionForDiscovery.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * GroupVersion contains the \"group/version\" and \"version\" string of a version. It is made a struct to keep extensibility. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1GroupVersionForDiscovery { public static final String SERIALIZED_NAME_GROUP_VERSION = "groupVersion"; @SerializedName(SERIALIZED_NAME_GROUP_VERSION) @@ -63,7 +63,6 @@ public V1GroupVersionForDiscovery() { } public V1GroupVersionForDiscovery groupVersion(String groupVersion) { - this.groupVersion = groupVersion; return this; } @@ -77,14 +76,12 @@ public String getGroupVersion() { return groupVersion; } - public void setGroupVersion(String groupVersion) { this.groupVersion = groupVersion; } public V1GroupVersionForDiscovery version(String version) { - this.version = version; return this; } @@ -98,7 +95,6 @@ public String getVersion() { return version; } - public void setVersion(String version) { this.version = version; } @@ -161,32 +157,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1GroupVersionForDiscovery + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1GroupVersionForDiscovery */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1GroupVersionForDiscovery.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1GroupVersionForDiscovery.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1GroupVersionForDiscovery is not found in the empty JSON string", V1GroupVersionForDiscovery.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1GroupVersionForDiscovery.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1GroupVersionForDiscovery` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1GroupVersionForDiscovery` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1GroupVersionForDiscovery.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("groupVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `groupVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("groupVersion").toString())); } @@ -215,9 +212,9 @@ public void write(JsonWriter out, V1GroupVersionForDiscovery value) throws IOExc @Override public V1GroupVersionForDiscovery read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -244,3 +241,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1HTTPGetAction.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1HTTPGetAction.java index 83736d6d2d..ca519e5864 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1HTTPGetAction.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1HTTPGetAction.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1HTTPHeader; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * HTTPGetAction describes an action based on HTTP Get requests. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1HTTPGetAction { public static final String SERIALIZED_NAME_HOST = "host"; @SerializedName(SERIALIZED_NAME_HOST) @@ -61,7 +61,7 @@ public class V1HTTPGetAction { public static final String SERIALIZED_NAME_HTTP_HEADERS = "httpHeaders"; @SerializedName(SERIALIZED_NAME_HTTP_HEADERS) - private List httpHeaders; + private List httpHeaders = new ArrayList<>(); public static final String SERIALIZED_NAME_PATH = "path"; @SerializedName(SERIALIZED_NAME_PATH) @@ -79,7 +79,6 @@ public V1HTTPGetAction() { } public V1HTTPGetAction host(String host) { - this.host = host; return this; } @@ -93,14 +92,12 @@ public String getHost() { return host; } - public void setHost(String host) { this.host = host; } public V1HTTPGetAction httpHeaders(List httpHeaders) { - this.httpHeaders = httpHeaders; return this; } @@ -122,14 +119,12 @@ public List getHttpHeaders() { return httpHeaders; } - public void setHttpHeaders(List httpHeaders) { this.httpHeaders = httpHeaders; } public V1HTTPGetAction path(String path) { - this.path = path; return this; } @@ -143,14 +138,12 @@ public String getPath() { return path; } - public void setPath(String path) { this.path = path; } public V1HTTPGetAction port(IntOrString port) { - this.port = port; return this; } @@ -164,14 +157,12 @@ public IntOrString getPort() { return port; } - public void setPort(IntOrString port) { this.port = port; } public V1HTTPGetAction scheme(String scheme) { - this.scheme = scheme; return this; } @@ -185,7 +176,6 @@ public String getScheme() { return scheme; } - public void setScheme(String scheme) { this.scheme = scheme; } @@ -256,32 +246,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1HTTPGetAction + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1HTTPGetAction */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1HTTPGetAction.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1HTTPGetAction.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1HTTPGetAction is not found in the empty JSON string", V1HTTPGetAction.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1HTTPGetAction.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1HTTPGetAction` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1HTTPGetAction` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1HTTPGetAction.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("host") != null && !jsonObj.get("host").isJsonNull()) && !jsonObj.get("host").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `host` to be a primitive type in the JSON string but got `%s`", jsonObj.get("host").toString())); } @@ -295,7 +286,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `httpHeaders` (array) for (int i = 0; i < jsonArrayhttpHeaders.size(); i++) { - V1HTTPHeader.validateJsonObject(jsonArrayhttpHeaders.get(i).getAsJsonObject()); + V1HTTPHeader.validateJsonElement(jsonArrayhttpHeaders.get(i)); }; } } @@ -330,9 +321,9 @@ public void write(JsonWriter out, V1HTTPGetAction value) throws IOException { @Override public V1HTTPGetAction read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -359,3 +350,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1HTTPHeader.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1HTTPHeader.java index 3525c4c2e2..d4de319f7b 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1HTTPHeader.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1HTTPHeader.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * HTTPHeader describes a custom header to be used in HTTP probes */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1HTTPHeader { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) @@ -63,7 +63,6 @@ public V1HTTPHeader() { } public V1HTTPHeader name(String name) { - this.name = name; return this; } @@ -77,14 +76,12 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } public V1HTTPHeader value(String value) { - this.value = value; return this; } @@ -98,7 +95,6 @@ public String getValue() { return value; } - public void setValue(String value) { this.value = value; } @@ -161,32 +157,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1HTTPHeader + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1HTTPHeader */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1HTTPHeader.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1HTTPHeader.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1HTTPHeader is not found in the empty JSON string", V1HTTPHeader.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1HTTPHeader.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1HTTPHeader` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1HTTPHeader` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1HTTPHeader.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } @@ -215,9 +212,9 @@ public void write(JsonWriter out, V1HTTPHeader value) throws IOException { @Override public V1HTTPHeader read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -244,3 +241,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1HTTPIngressPath.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1HTTPIngressPath.java index b8ce0bbf1e..8085a3a7cb 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1HTTPIngressPath.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1HTTPIngressPath.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.openapi.models.V1IngressBackend; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * HTTPIngressPath associates a path with a backend. Incoming urls matching the path are forwarded to the backend. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1HTTPIngressPath { public static final String SERIALIZED_NAME_BACKEND = "backend"; @SerializedName(SERIALIZED_NAME_BACKEND) @@ -68,7 +68,6 @@ public V1HTTPIngressPath() { } public V1HTTPIngressPath backend(V1IngressBackend backend) { - this.backend = backend; return this; } @@ -82,14 +81,12 @@ public V1IngressBackend getBackend() { return backend; } - public void setBackend(V1IngressBackend backend) { this.backend = backend; } public V1HTTPIngressPath path(String path) { - this.path = path; return this; } @@ -103,14 +100,12 @@ public String getPath() { return path; } - public void setPath(String path) { this.path = path; } public V1HTTPIngressPath pathType(String pathType) { - this.pathType = pathType; return this; } @@ -124,7 +119,6 @@ public String getPathType() { return pathType; } - public void setPathType(String pathType) { this.pathType = pathType; } @@ -190,34 +184,35 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1HTTPIngressPath + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1HTTPIngressPath */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1HTTPIngressPath.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1HTTPIngressPath.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1HTTPIngressPath is not found in the empty JSON string", V1HTTPIngressPath.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1HTTPIngressPath.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1HTTPIngressPath` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1HTTPIngressPath` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1HTTPIngressPath.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the required field `backend` - V1IngressBackend.validateJsonObject(jsonObj.getAsJsonObject("backend")); + V1IngressBackend.validateJsonElement(jsonObj.get("backend")); if ((jsonObj.get("path") != null && !jsonObj.get("path").isJsonNull()) && !jsonObj.get("path").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `path` to be a primitive type in the JSON string but got `%s`", jsonObj.get("path").toString())); } @@ -246,9 +241,9 @@ public void write(JsonWriter out, V1HTTPIngressPath value) throws IOException { @Override public V1HTTPIngressPath read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -275,3 +270,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1HTTPIngressRuleValue.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1HTTPIngressRuleValue.java index 63448fc109..776f20e74e 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1HTTPIngressRuleValue.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1HTTPIngressRuleValue.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1HTTPIngressPath; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * 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 '#'. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1HTTPIngressRuleValue { public static final String SERIALIZED_NAME_PATHS = "paths"; @SerializedName(SERIALIZED_NAME_PATHS) @@ -62,7 +62,6 @@ public V1HTTPIngressRuleValue() { } public V1HTTPIngressRuleValue paths(List paths) { - this.paths = paths; return this; } @@ -84,7 +83,6 @@ public List getPaths() { return paths; } - public void setPaths(List paths) { this.paths = paths; } @@ -143,32 +141,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1HTTPIngressRuleValue + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1HTTPIngressRuleValue */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1HTTPIngressRuleValue.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1HTTPIngressRuleValue.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1HTTPIngressRuleValue is not found in the empty JSON string", V1HTTPIngressRuleValue.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1HTTPIngressRuleValue.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1HTTPIngressRuleValue` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1HTTPIngressRuleValue` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1HTTPIngressRuleValue.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the json data is an array if (!jsonObj.get("paths").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `paths` to be an array in the JSON string but got `%s`", jsonObj.get("paths").toString())); @@ -177,7 +176,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArraypaths = jsonObj.getAsJsonArray("paths"); // validate the required field `paths` (array) for (int i = 0; i < jsonArraypaths.size(); i++) { - V1HTTPIngressPath.validateJsonObject(jsonArraypaths.get(i).getAsJsonObject()); + V1HTTPIngressPath.validateJsonElement(jsonArraypaths.get(i)); }; } @@ -201,9 +200,9 @@ public void write(JsonWriter out, V1HTTPIngressRuleValue value) throws IOExcepti @Override public V1HTTPIngressRuleValue read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -230,3 +229,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1HorizontalPodAutoscaler.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1HorizontalPodAutoscaler.java index 7513e4fae2..d431c0398f 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1HorizontalPodAutoscaler.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1HorizontalPodAutoscaler.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1HorizontalPodAutoscalerStatus; import io.kubernetes.client.openapi.models.V1ObjectMeta; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * configuration of a horizontal pod autoscaler. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1HorizontalPodAutoscaler implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -78,7 +78,6 @@ public V1HorizontalPodAutoscaler() { } public V1HorizontalPodAutoscaler apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -92,14 +91,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1HorizontalPodAutoscaler kind(String kind) { - this.kind = kind; return this; } @@ -113,14 +110,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1HorizontalPodAutoscaler metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -134,14 +129,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V1HorizontalPodAutoscaler spec(V1HorizontalPodAutoscalerSpec spec) { - this.spec = spec; return this; } @@ -155,14 +148,12 @@ public V1HorizontalPodAutoscalerSpec getSpec() { return spec; } - public void setSpec(V1HorizontalPodAutoscalerSpec spec) { this.spec = spec; } public V1HorizontalPodAutoscaler status(V1HorizontalPodAutoscalerStatus status) { - this.status = status; return this; } @@ -176,7 +167,6 @@ public V1HorizontalPodAutoscalerStatus getStatus() { return status; } - public void setStatus(V1HorizontalPodAutoscalerStatus status) { this.status = status; } @@ -246,25 +236,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1HorizontalPodAutoscaler + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1HorizontalPodAutoscaler */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1HorizontalPodAutoscaler.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1HorizontalPodAutoscaler.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1HorizontalPodAutoscaler is not found in the empty JSON string", V1HorizontalPodAutoscaler.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1HorizontalPodAutoscaler.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1HorizontalPodAutoscaler` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1HorizontalPodAutoscaler` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -273,15 +264,15 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } // validate the optional field `spec` if (jsonObj.get("spec") != null && !jsonObj.get("spec").isJsonNull()) { - V1HorizontalPodAutoscalerSpec.validateJsonObject(jsonObj.getAsJsonObject("spec")); + V1HorizontalPodAutoscalerSpec.validateJsonElement(jsonObj.get("spec")); } // validate the optional field `status` if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { - V1HorizontalPodAutoscalerStatus.validateJsonObject(jsonObj.getAsJsonObject("status")); + V1HorizontalPodAutoscalerStatus.validateJsonElement(jsonObj.get("status")); } } @@ -305,9 +296,9 @@ public void write(JsonWriter out, V1HorizontalPodAutoscaler value) throws IOExce @Override public V1HorizontalPodAutoscaler read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -334,3 +325,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1HorizontalPodAutoscalerList.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1HorizontalPodAutoscalerList.java index 139743c042..7279f90496 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1HorizontalPodAutoscalerList.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1HorizontalPodAutoscalerList.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1ListMeta; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * list of horizontal pod autoscaler objects. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1HorizontalPodAutoscalerList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -75,7 +75,6 @@ public V1HorizontalPodAutoscalerList() { } public V1HorizontalPodAutoscalerList apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -89,14 +88,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1HorizontalPodAutoscalerList items(List items) { - this.items = items; return this; } @@ -118,14 +115,12 @@ public List getItems() { return items; } - public void setItems(List items) { this.items = items; } public V1HorizontalPodAutoscalerList kind(String kind) { - this.kind = kind; return this; } @@ -139,14 +134,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1HorizontalPodAutoscalerList metadata(V1ListMeta metadata) { - this.metadata = metadata; return this; } @@ -160,7 +153,6 @@ public V1ListMeta getMetadata() { return metadata; } - public void setMetadata(V1ListMeta metadata) { this.metadata = metadata; } @@ -228,32 +220,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1HorizontalPodAutoscalerList + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1HorizontalPodAutoscalerList */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1HorizontalPodAutoscalerList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1HorizontalPodAutoscalerList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1HorizontalPodAutoscalerList is not found in the empty JSON string", V1HorizontalPodAutoscalerList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1HorizontalPodAutoscalerList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1HorizontalPodAutoscalerList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1HorizontalPodAutoscalerList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1HorizontalPodAutoscalerList.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -265,14 +258,14 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); // validate the required field `items` (array) for (int i = 0; i < jsonArrayitems.size(); i++) { - V1HorizontalPodAutoscaler.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject()); + V1HorizontalPodAutoscaler.validateJsonElement(jsonArrayitems.get(i)); }; if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ListMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ListMeta.validateJsonElement(jsonObj.get("metadata")); } } @@ -296,9 +289,9 @@ public void write(JsonWriter out, V1HorizontalPodAutoscalerList value) throws IO @Override public V1HorizontalPodAutoscalerList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -325,3 +318,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1HorizontalPodAutoscalerSpec.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1HorizontalPodAutoscalerSpec.java index 9cdd9eb277..bad0d25d7a 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1HorizontalPodAutoscalerSpec.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1HorizontalPodAutoscalerSpec.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.openapi.models.V1CrossVersionObjectReference; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * specification of a horizontal pod autoscaler. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1HorizontalPodAutoscalerSpec { public static final String SERIALIZED_NAME_MAX_REPLICAS = "maxReplicas"; @SerializedName(SERIALIZED_NAME_MAX_REPLICAS) @@ -72,7 +72,6 @@ public V1HorizontalPodAutoscalerSpec() { } public V1HorizontalPodAutoscalerSpec maxReplicas(Integer maxReplicas) { - this.maxReplicas = maxReplicas; return this; } @@ -86,14 +85,12 @@ public Integer getMaxReplicas() { return maxReplicas; } - public void setMaxReplicas(Integer maxReplicas) { this.maxReplicas = maxReplicas; } public V1HorizontalPodAutoscalerSpec minReplicas(Integer minReplicas) { - this.minReplicas = minReplicas; return this; } @@ -107,14 +104,12 @@ public Integer getMinReplicas() { return minReplicas; } - public void setMinReplicas(Integer minReplicas) { this.minReplicas = minReplicas; } public V1HorizontalPodAutoscalerSpec scaleTargetRef(V1CrossVersionObjectReference scaleTargetRef) { - this.scaleTargetRef = scaleTargetRef; return this; } @@ -128,14 +123,12 @@ public V1CrossVersionObjectReference getScaleTargetRef() { return scaleTargetRef; } - public void setScaleTargetRef(V1CrossVersionObjectReference scaleTargetRef) { this.scaleTargetRef = scaleTargetRef; } public V1HorizontalPodAutoscalerSpec targetCPUUtilizationPercentage(Integer targetCPUUtilizationPercentage) { - this.targetCPUUtilizationPercentage = targetCPUUtilizationPercentage; return this; } @@ -149,7 +142,6 @@ public Integer getTargetCPUUtilizationPercentage() { return targetCPUUtilizationPercentage; } - public void setTargetCPUUtilizationPercentage(Integer targetCPUUtilizationPercentage) { this.targetCPUUtilizationPercentage = targetCPUUtilizationPercentage; } @@ -218,34 +210,35 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1HorizontalPodAutoscalerSpec + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1HorizontalPodAutoscalerSpec */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1HorizontalPodAutoscalerSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1HorizontalPodAutoscalerSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1HorizontalPodAutoscalerSpec is not found in the empty JSON string", V1HorizontalPodAutoscalerSpec.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1HorizontalPodAutoscalerSpec.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1HorizontalPodAutoscalerSpec` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1HorizontalPodAutoscalerSpec` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1HorizontalPodAutoscalerSpec.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the required field `scaleTargetRef` - V1CrossVersionObjectReference.validateJsonObject(jsonObj.getAsJsonObject("scaleTargetRef")); + V1CrossVersionObjectReference.validateJsonElement(jsonObj.get("scaleTargetRef")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -268,9 +261,9 @@ public void write(JsonWriter out, V1HorizontalPodAutoscalerSpec value) throws IO @Override public V1HorizontalPodAutoscalerSpec read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -297,3 +290,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1HorizontalPodAutoscalerStatus.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1HorizontalPodAutoscalerStatus.java index 02a9bca68d..0762156834 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1HorizontalPodAutoscalerStatus.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1HorizontalPodAutoscalerStatus.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * current status of a horizontal pod autoscaler */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1HorizontalPodAutoscalerStatus { public static final String SERIALIZED_NAME_CURRENT_C_P_U_UTILIZATION_PERCENTAGE = "currentCPUUtilizationPercentage"; @SerializedName(SERIALIZED_NAME_CURRENT_C_P_U_UTILIZATION_PERCENTAGE) @@ -76,7 +76,6 @@ public V1HorizontalPodAutoscalerStatus() { } public V1HorizontalPodAutoscalerStatus currentCPUUtilizationPercentage(Integer currentCPUUtilizationPercentage) { - this.currentCPUUtilizationPercentage = currentCPUUtilizationPercentage; return this; } @@ -90,14 +89,12 @@ public Integer getCurrentCPUUtilizationPercentage() { return currentCPUUtilizationPercentage; } - public void setCurrentCPUUtilizationPercentage(Integer currentCPUUtilizationPercentage) { this.currentCPUUtilizationPercentage = currentCPUUtilizationPercentage; } public V1HorizontalPodAutoscalerStatus currentReplicas(Integer currentReplicas) { - this.currentReplicas = currentReplicas; return this; } @@ -111,14 +108,12 @@ public Integer getCurrentReplicas() { return currentReplicas; } - public void setCurrentReplicas(Integer currentReplicas) { this.currentReplicas = currentReplicas; } public V1HorizontalPodAutoscalerStatus desiredReplicas(Integer desiredReplicas) { - this.desiredReplicas = desiredReplicas; return this; } @@ -132,14 +127,12 @@ public Integer getDesiredReplicas() { return desiredReplicas; } - public void setDesiredReplicas(Integer desiredReplicas) { this.desiredReplicas = desiredReplicas; } public V1HorizontalPodAutoscalerStatus lastScaleTime(OffsetDateTime lastScaleTime) { - this.lastScaleTime = lastScaleTime; return this; } @@ -153,14 +146,12 @@ public OffsetDateTime getLastScaleTime() { return lastScaleTime; } - public void setLastScaleTime(OffsetDateTime lastScaleTime) { this.lastScaleTime = lastScaleTime; } public V1HorizontalPodAutoscalerStatus observedGeneration(Long observedGeneration) { - this.observedGeneration = observedGeneration; return this; } @@ -174,7 +165,6 @@ public Long getObservedGeneration() { return observedGeneration; } - public void setObservedGeneration(Long observedGeneration) { this.observedGeneration = observedGeneration; } @@ -246,32 +236,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1HorizontalPodAutoscalerStatus + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1HorizontalPodAutoscalerStatus */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1HorizontalPodAutoscalerStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1HorizontalPodAutoscalerStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1HorizontalPodAutoscalerStatus is not found in the empty JSON string", V1HorizontalPodAutoscalerStatus.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1HorizontalPodAutoscalerStatus.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1HorizontalPodAutoscalerStatus` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1HorizontalPodAutoscalerStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1HorizontalPodAutoscalerStatus.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -294,9 +285,9 @@ public void write(JsonWriter out, V1HorizontalPodAutoscalerStatus value) throws @Override public V1HorizontalPodAutoscalerStatus read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -323,3 +314,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1HostAlias.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1HostAlias.java index 3fb5cd90e6..5f392da613 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1HostAlias.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1HostAlias.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -43,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -51,11 +51,11 @@ /** * HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1HostAlias { public static final String SERIALIZED_NAME_HOSTNAMES = "hostnames"; @SerializedName(SERIALIZED_NAME_HOSTNAMES) - private List hostnames; + private List hostnames = new ArrayList<>(); public static final String SERIALIZED_NAME_IP = "ip"; @SerializedName(SERIALIZED_NAME_IP) @@ -65,7 +65,6 @@ public V1HostAlias() { } public V1HostAlias hostnames(List hostnames) { - this.hostnames = hostnames; return this; } @@ -87,14 +86,12 @@ public List getHostnames() { return hostnames; } - public void setHostnames(List hostnames) { this.hostnames = hostnames; } public V1HostAlias ip(String ip) { - this.ip = ip; return this; } @@ -103,12 +100,11 @@ public V1HostAlias ip(String ip) { * IP address of the host file entry. * @return ip **/ - @jakarta.annotation.Nullable + @jakarta.annotation.Nonnull public String getIp() { return ip; } - public void setIp(String ip) { this.ip = ip; } @@ -166,33 +162,42 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("ip"); } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1HostAlias + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1HostAlias */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1HostAlias.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1HostAlias.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1HostAlias is not found in the empty JSON string", V1HostAlias.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1HostAlias.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1HostAlias` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1HostAlias` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : V1HostAlias.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the optional json data is an array if present - if (jsonObj.get("hostnames") != null && !jsonObj.get("hostnames").isJsonArray()) { + if (jsonObj.get("hostnames") != null && !jsonObj.get("hostnames").isJsonNull() && !jsonObj.get("hostnames").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `hostnames` to be an array in the JSON string but got `%s`", jsonObj.get("hostnames").toString())); } - if ((jsonObj.get("ip") != null && !jsonObj.get("ip").isJsonNull()) && !jsonObj.get("ip").isJsonPrimitive()) { + if (!jsonObj.get("ip").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `ip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ip").toString())); } } @@ -217,9 +222,9 @@ public void write(JsonWriter out, V1HostAlias value) throws IOException { @Override public V1HostAlias read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -246,3 +251,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1HostIP.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1HostIP.java index f8c7bdc205..7d6f74c884 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1HostIP.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1HostIP.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * HostIP represents a single IP address allocated to the host. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1HostIP { public static final String SERIALIZED_NAME_IP = "ip"; @SerializedName(SERIALIZED_NAME_IP) @@ -59,7 +59,6 @@ public V1HostIP() { } public V1HostIP ip(String ip) { - this.ip = ip; return this; } @@ -68,12 +67,11 @@ public V1HostIP ip(String ip) { * IP is the IP address assigned to the host * @return ip **/ - @jakarta.annotation.Nullable + @jakarta.annotation.Nonnull public String getIp() { return ip; } - public void setIp(String ip) { this.ip = ip; } @@ -128,29 +126,38 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("ip"); } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1HostIP + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1HostIP */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1HostIP.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1HostIP.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1HostIP is not found in the empty JSON string", V1HostIP.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1HostIP.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1HostIP` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1HostIP` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } - if ((jsonObj.get("ip") != null && !jsonObj.get("ip").isJsonNull()) && !jsonObj.get("ip").isJsonPrimitive()) { + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : V1HostIP.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("ip").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `ip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ip").toString())); } } @@ -175,9 +182,9 @@ public void write(JsonWriter out, V1HostIP value) throws IOException { @Override public V1HostIP read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -204,3 +211,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1HostPathVolumeSource.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1HostPathVolumeSource.java index 534548c745..5e6c2d6e85 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1HostPathVolumeSource.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1HostPathVolumeSource.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * Represents a host path mapped into a pod. Host path volumes do not support ownership management or SELinux relabeling. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1HostPathVolumeSource { public static final String SERIALIZED_NAME_PATH = "path"; @SerializedName(SERIALIZED_NAME_PATH) @@ -63,7 +63,6 @@ public V1HostPathVolumeSource() { } public V1HostPathVolumeSource path(String path) { - this.path = path; return this; } @@ -77,14 +76,12 @@ public String getPath() { return path; } - public void setPath(String path) { this.path = path; } public V1HostPathVolumeSource type(String type) { - this.type = type; return this; } @@ -98,7 +95,6 @@ public String getType() { return type; } - public void setType(String type) { this.type = type; } @@ -160,32 +156,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1HostPathVolumeSource + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1HostPathVolumeSource */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1HostPathVolumeSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1HostPathVolumeSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1HostPathVolumeSource is not found in the empty JSON string", V1HostPathVolumeSource.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1HostPathVolumeSource.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1HostPathVolumeSource` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1HostPathVolumeSource` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1HostPathVolumeSource.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("path").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `path` to be a primitive type in the JSON string but got `%s`", jsonObj.get("path").toString())); } @@ -214,9 +211,9 @@ public void write(JsonWriter out, V1HostPathVolumeSource value) throws IOExcepti @Override public V1HostPathVolumeSource read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -243,3 +240,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1IPBlock.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1IPBlock.java index a1ee4536f5..2b5b017cae 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1IPBlock.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1IPBlock.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -43,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -51,7 +51,7 @@ /** * IPBlock describes a particular CIDR (Ex. \"192.168.1.0/24\",\"2001:db8::/64\") that is allowed to the pods matched by a NetworkPolicySpec's podSelector. The except entry describes CIDRs that should not be included within this rule. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1IPBlock { public static final String SERIALIZED_NAME_CIDR = "cidr"; @SerializedName(SERIALIZED_NAME_CIDR) @@ -59,13 +59,12 @@ public class V1IPBlock { public static final String SERIALIZED_NAME_EXCEPT = "except"; @SerializedName(SERIALIZED_NAME_EXCEPT) - private List except; + private List except = new ArrayList<>(); public V1IPBlock() { } public V1IPBlock cidr(String cidr) { - this.cidr = cidr; return this; } @@ -79,14 +78,12 @@ public String getCidr() { return cidr; } - public void setCidr(String cidr) { this.cidr = cidr; } public V1IPBlock except(List except) { - this.except = except; return this; } @@ -108,7 +105,6 @@ public List getExcept() { return except; } - public void setExcept(List except) { this.except = except; } @@ -170,37 +166,38 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1IPBlock + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1IPBlock */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1IPBlock.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1IPBlock.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1IPBlock is not found in the empty JSON string", V1IPBlock.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1IPBlock.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1IPBlock` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1IPBlock` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1IPBlock.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("cidr").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `cidr` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cidr").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("except") != null && !jsonObj.get("except").isJsonArray()) { + if (jsonObj.get("except") != null && !jsonObj.get("except").isJsonNull() && !jsonObj.get("except").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `except` to be an array in the JSON string but got `%s`", jsonObj.get("except").toString())); } } @@ -225,9 +222,9 @@ public void write(JsonWriter out, V1IPBlock value) throws IOException { @Override public V1IPBlock read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -254,3 +251,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ISCSIPersistentVolumeSource.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ISCSIPersistentVolumeSource.java index 5ae03d924d..58688ef1b9 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ISCSIPersistentVolumeSource.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ISCSIPersistentVolumeSource.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1SecretReference; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * ISCSIPersistentVolumeSource represents an ISCSI disk. ISCSI volumes can only be mounted as read/write once. ISCSI volumes support ownership management and SELinux relabeling. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ISCSIPersistentVolumeSource { public static final String SERIALIZED_NAME_CHAP_AUTH_DISCOVERY = "chapAuthDiscovery"; @SerializedName(SERIALIZED_NAME_CHAP_AUTH_DISCOVERY) @@ -84,7 +84,7 @@ public class V1ISCSIPersistentVolumeSource { public static final String SERIALIZED_NAME_PORTALS = "portals"; @SerializedName(SERIALIZED_NAME_PORTALS) - private List portals; + private List portals = new ArrayList<>(); public static final String SERIALIZED_NAME_READ_ONLY = "readOnly"; @SerializedName(SERIALIZED_NAME_READ_ONLY) @@ -102,7 +102,6 @@ public V1ISCSIPersistentVolumeSource() { } public V1ISCSIPersistentVolumeSource chapAuthDiscovery(Boolean chapAuthDiscovery) { - this.chapAuthDiscovery = chapAuthDiscovery; return this; } @@ -116,14 +115,12 @@ public Boolean getChapAuthDiscovery() { return chapAuthDiscovery; } - public void setChapAuthDiscovery(Boolean chapAuthDiscovery) { this.chapAuthDiscovery = chapAuthDiscovery; } public V1ISCSIPersistentVolumeSource chapAuthSession(Boolean chapAuthSession) { - this.chapAuthSession = chapAuthSession; return this; } @@ -137,14 +134,12 @@ public Boolean getChapAuthSession() { return chapAuthSession; } - public void setChapAuthSession(Boolean chapAuthSession) { this.chapAuthSession = chapAuthSession; } public V1ISCSIPersistentVolumeSource fsType(String fsType) { - this.fsType = fsType; return this; } @@ -158,14 +153,12 @@ public String getFsType() { return fsType; } - public void setFsType(String fsType) { this.fsType = fsType; } public V1ISCSIPersistentVolumeSource initiatorName(String initiatorName) { - this.initiatorName = initiatorName; return this; } @@ -179,14 +172,12 @@ public String getInitiatorName() { return initiatorName; } - public void setInitiatorName(String initiatorName) { this.initiatorName = initiatorName; } public V1ISCSIPersistentVolumeSource iqn(String iqn) { - this.iqn = iqn; return this; } @@ -200,14 +191,12 @@ public String getIqn() { return iqn; } - public void setIqn(String iqn) { this.iqn = iqn; } public V1ISCSIPersistentVolumeSource iscsiInterface(String iscsiInterface) { - this.iscsiInterface = iscsiInterface; return this; } @@ -221,14 +210,12 @@ public String getIscsiInterface() { return iscsiInterface; } - public void setIscsiInterface(String iscsiInterface) { this.iscsiInterface = iscsiInterface; } public V1ISCSIPersistentVolumeSource lun(Integer lun) { - this.lun = lun; return this; } @@ -242,14 +229,12 @@ public Integer getLun() { return lun; } - public void setLun(Integer lun) { this.lun = lun; } public V1ISCSIPersistentVolumeSource portals(List portals) { - this.portals = portals; return this; } @@ -271,14 +256,12 @@ public List getPortals() { return portals; } - public void setPortals(List portals) { this.portals = portals; } public V1ISCSIPersistentVolumeSource readOnly(Boolean readOnly) { - this.readOnly = readOnly; return this; } @@ -292,14 +275,12 @@ public Boolean getReadOnly() { return readOnly; } - public void setReadOnly(Boolean readOnly) { this.readOnly = readOnly; } public V1ISCSIPersistentVolumeSource secretRef(V1SecretReference secretRef) { - this.secretRef = secretRef; return this; } @@ -313,14 +294,12 @@ public V1SecretReference getSecretRef() { return secretRef; } - public void setSecretRef(V1SecretReference secretRef) { this.secretRef = secretRef; } public V1ISCSIPersistentVolumeSource targetPortal(String targetPortal) { - this.targetPortal = targetPortal; return this; } @@ -334,7 +313,6 @@ public String getTargetPortal() { return targetPortal; } - public void setTargetPortal(String targetPortal) { this.targetPortal = targetPortal; } @@ -425,32 +403,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ISCSIPersistentVolumeSource + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ISCSIPersistentVolumeSource */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ISCSIPersistentVolumeSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ISCSIPersistentVolumeSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ISCSIPersistentVolumeSource is not found in the empty JSON string", V1ISCSIPersistentVolumeSource.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ISCSIPersistentVolumeSource.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ISCSIPersistentVolumeSource` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ISCSIPersistentVolumeSource` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1ISCSIPersistentVolumeSource.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("fsType") != null && !jsonObj.get("fsType").isJsonNull()) && !jsonObj.get("fsType").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `fsType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fsType").toString())); } @@ -464,12 +443,12 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("Expected the field `iscsiInterface` to be a primitive type in the JSON string but got `%s`", jsonObj.get("iscsiInterface").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("portals") != null && !jsonObj.get("portals").isJsonArray()) { + if (jsonObj.get("portals") != null && !jsonObj.get("portals").isJsonNull() && !jsonObj.get("portals").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `portals` to be an array in the JSON string but got `%s`", jsonObj.get("portals").toString())); } // validate the optional field `secretRef` if (jsonObj.get("secretRef") != null && !jsonObj.get("secretRef").isJsonNull()) { - V1SecretReference.validateJsonObject(jsonObj.getAsJsonObject("secretRef")); + V1SecretReference.validateJsonElement(jsonObj.get("secretRef")); } if (!jsonObj.get("targetPortal").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `targetPortal` to be a primitive type in the JSON string but got `%s`", jsonObj.get("targetPortal").toString())); @@ -496,9 +475,9 @@ public void write(JsonWriter out, V1ISCSIPersistentVolumeSource value) throws IO @Override public V1ISCSIPersistentVolumeSource read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -525,3 +504,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ISCSIVolumeSource.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ISCSIVolumeSource.java index 2e072b69a4..eda14041e7 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ISCSIVolumeSource.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ISCSIVolumeSource.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1LocalObjectReference; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * Represents an ISCSI disk. ISCSI volumes can only be mounted as read/write once. ISCSI volumes support ownership management and SELinux relabeling. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ISCSIVolumeSource { public static final String SERIALIZED_NAME_CHAP_AUTH_DISCOVERY = "chapAuthDiscovery"; @SerializedName(SERIALIZED_NAME_CHAP_AUTH_DISCOVERY) @@ -84,7 +84,7 @@ public class V1ISCSIVolumeSource { public static final String SERIALIZED_NAME_PORTALS = "portals"; @SerializedName(SERIALIZED_NAME_PORTALS) - private List portals; + private List portals = new ArrayList<>(); public static final String SERIALIZED_NAME_READ_ONLY = "readOnly"; @SerializedName(SERIALIZED_NAME_READ_ONLY) @@ -102,7 +102,6 @@ public V1ISCSIVolumeSource() { } public V1ISCSIVolumeSource chapAuthDiscovery(Boolean chapAuthDiscovery) { - this.chapAuthDiscovery = chapAuthDiscovery; return this; } @@ -116,14 +115,12 @@ public Boolean getChapAuthDiscovery() { return chapAuthDiscovery; } - public void setChapAuthDiscovery(Boolean chapAuthDiscovery) { this.chapAuthDiscovery = chapAuthDiscovery; } public V1ISCSIVolumeSource chapAuthSession(Boolean chapAuthSession) { - this.chapAuthSession = chapAuthSession; return this; } @@ -137,14 +134,12 @@ public Boolean getChapAuthSession() { return chapAuthSession; } - public void setChapAuthSession(Boolean chapAuthSession) { this.chapAuthSession = chapAuthSession; } public V1ISCSIVolumeSource fsType(String fsType) { - this.fsType = fsType; return this; } @@ -158,14 +153,12 @@ public String getFsType() { return fsType; } - public void setFsType(String fsType) { this.fsType = fsType; } public V1ISCSIVolumeSource initiatorName(String initiatorName) { - this.initiatorName = initiatorName; return this; } @@ -179,14 +172,12 @@ public String getInitiatorName() { return initiatorName; } - public void setInitiatorName(String initiatorName) { this.initiatorName = initiatorName; } public V1ISCSIVolumeSource iqn(String iqn) { - this.iqn = iqn; return this; } @@ -200,14 +191,12 @@ public String getIqn() { return iqn; } - public void setIqn(String iqn) { this.iqn = iqn; } public V1ISCSIVolumeSource iscsiInterface(String iscsiInterface) { - this.iscsiInterface = iscsiInterface; return this; } @@ -221,14 +210,12 @@ public String getIscsiInterface() { return iscsiInterface; } - public void setIscsiInterface(String iscsiInterface) { this.iscsiInterface = iscsiInterface; } public V1ISCSIVolumeSource lun(Integer lun) { - this.lun = lun; return this; } @@ -242,14 +229,12 @@ public Integer getLun() { return lun; } - public void setLun(Integer lun) { this.lun = lun; } public V1ISCSIVolumeSource portals(List portals) { - this.portals = portals; return this; } @@ -271,14 +256,12 @@ public List getPortals() { return portals; } - public void setPortals(List portals) { this.portals = portals; } public V1ISCSIVolumeSource readOnly(Boolean readOnly) { - this.readOnly = readOnly; return this; } @@ -292,14 +275,12 @@ public Boolean getReadOnly() { return readOnly; } - public void setReadOnly(Boolean readOnly) { this.readOnly = readOnly; } public V1ISCSIVolumeSource secretRef(V1LocalObjectReference secretRef) { - this.secretRef = secretRef; return this; } @@ -313,14 +294,12 @@ public V1LocalObjectReference getSecretRef() { return secretRef; } - public void setSecretRef(V1LocalObjectReference secretRef) { this.secretRef = secretRef; } public V1ISCSIVolumeSource targetPortal(String targetPortal) { - this.targetPortal = targetPortal; return this; } @@ -334,7 +313,6 @@ public String getTargetPortal() { return targetPortal; } - public void setTargetPortal(String targetPortal) { this.targetPortal = targetPortal; } @@ -425,32 +403,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ISCSIVolumeSource + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ISCSIVolumeSource */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ISCSIVolumeSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ISCSIVolumeSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ISCSIVolumeSource is not found in the empty JSON string", V1ISCSIVolumeSource.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ISCSIVolumeSource.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ISCSIVolumeSource` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ISCSIVolumeSource` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1ISCSIVolumeSource.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("fsType") != null && !jsonObj.get("fsType").isJsonNull()) && !jsonObj.get("fsType").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `fsType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fsType").toString())); } @@ -464,12 +443,12 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("Expected the field `iscsiInterface` to be a primitive type in the JSON string but got `%s`", jsonObj.get("iscsiInterface").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("portals") != null && !jsonObj.get("portals").isJsonArray()) { + if (jsonObj.get("portals") != null && !jsonObj.get("portals").isJsonNull() && !jsonObj.get("portals").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `portals` to be an array in the JSON string but got `%s`", jsonObj.get("portals").toString())); } // validate the optional field `secretRef` if (jsonObj.get("secretRef") != null && !jsonObj.get("secretRef").isJsonNull()) { - V1LocalObjectReference.validateJsonObject(jsonObj.getAsJsonObject("secretRef")); + V1LocalObjectReference.validateJsonElement(jsonObj.get("secretRef")); } if (!jsonObj.get("targetPortal").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `targetPortal` to be a primitive type in the JSON string but got `%s`", jsonObj.get("targetPortal").toString())); @@ -496,9 +475,9 @@ public void write(JsonWriter out, V1ISCSIVolumeSource value) throws IOException @Override public V1ISCSIVolumeSource read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -525,3 +504,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Ingress.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Ingress.java index 0501645ebf..50d19ea1d5 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Ingress.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Ingress.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1IngressStatus; import io.kubernetes.client.openapi.models.V1ObjectMeta; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * 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. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1Ingress implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -78,7 +78,6 @@ public V1Ingress() { } public V1Ingress apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -92,14 +91,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1Ingress kind(String kind) { - this.kind = kind; return this; } @@ -113,14 +110,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1Ingress metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -134,14 +129,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V1Ingress spec(V1IngressSpec spec) { - this.spec = spec; return this; } @@ -155,14 +148,12 @@ public V1IngressSpec getSpec() { return spec; } - public void setSpec(V1IngressSpec spec) { this.spec = spec; } public V1Ingress status(V1IngressStatus status) { - this.status = status; return this; } @@ -176,7 +167,6 @@ public V1IngressStatus getStatus() { return status; } - public void setStatus(V1IngressStatus status) { this.status = status; } @@ -246,25 +236,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1Ingress + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1Ingress */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1Ingress.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1Ingress.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1Ingress is not found in the empty JSON string", V1Ingress.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1Ingress.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1Ingress` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1Ingress` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -273,15 +264,15 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } // validate the optional field `spec` if (jsonObj.get("spec") != null && !jsonObj.get("spec").isJsonNull()) { - V1IngressSpec.validateJsonObject(jsonObj.getAsJsonObject("spec")); + V1IngressSpec.validateJsonElement(jsonObj.get("spec")); } // validate the optional field `status` if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { - V1IngressStatus.validateJsonObject(jsonObj.getAsJsonObject("status")); + V1IngressStatus.validateJsonElement(jsonObj.get("status")); } } @@ -305,9 +296,9 @@ public void write(JsonWriter out, V1Ingress value) throws IOException { @Override public V1Ingress read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -334,3 +325,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1IngressBackend.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1IngressBackend.java index c4886f7ddb..67bb1bd8ac 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1IngressBackend.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1IngressBackend.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1IngressServiceBackend; import io.kubernetes.client.openapi.models.V1TypedLocalObjectReference; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -43,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -51,7 +51,7 @@ /** * IngressBackend describes all endpoints for a given service and port. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1IngressBackend { public static final String SERIALIZED_NAME_RESOURCE = "resource"; @SerializedName(SERIALIZED_NAME_RESOURCE) @@ -65,7 +65,6 @@ public V1IngressBackend() { } public V1IngressBackend resource(V1TypedLocalObjectReference resource) { - this.resource = resource; return this; } @@ -79,14 +78,12 @@ public V1TypedLocalObjectReference getResource() { return resource; } - public void setResource(V1TypedLocalObjectReference resource) { this.resource = resource; } public V1IngressBackend service(V1IngressServiceBackend service) { - this.service = service; return this; } @@ -100,7 +97,6 @@ public V1IngressServiceBackend getService() { return service; } - public void setService(V1IngressServiceBackend service) { this.service = service; } @@ -161,32 +157,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1IngressBackend + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1IngressBackend */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1IngressBackend.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1IngressBackend.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1IngressBackend is not found in the empty JSON string", V1IngressBackend.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1IngressBackend.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1IngressBackend` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1IngressBackend` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `resource` if (jsonObj.get("resource") != null && !jsonObj.get("resource").isJsonNull()) { - V1TypedLocalObjectReference.validateJsonObject(jsonObj.getAsJsonObject("resource")); + V1TypedLocalObjectReference.validateJsonElement(jsonObj.get("resource")); } // validate the optional field `service` if (jsonObj.get("service") != null && !jsonObj.get("service").isJsonNull()) { - V1IngressServiceBackend.validateJsonObject(jsonObj.getAsJsonObject("service")); + V1IngressServiceBackend.validateJsonElement(jsonObj.get("service")); } } @@ -210,9 +207,9 @@ public void write(JsonWriter out, V1IngressBackend value) throws IOException { @Override public V1IngressBackend read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -239,3 +236,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1IngressClass.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1IngressClass.java index 25bdf832bc..276b0d7033 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1IngressClass.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1IngressClass.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1IngressClassSpec; import io.kubernetes.client.openapi.models.V1ObjectMeta; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -43,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -51,7 +51,7 @@ /** * IngressClass represents the class of the Ingress, referenced by the Ingress Spec. The `ingressclass.kubernetes.io/is-default-class` annotation can be used to indicate that an IngressClass should be considered default. When a single IngressClass resource has this annotation set to true, new Ingress resources without a class specified will be assigned this default class. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1IngressClass implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -73,7 +73,6 @@ public V1IngressClass() { } public V1IngressClass apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -87,14 +86,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1IngressClass kind(String kind) { - this.kind = kind; return this; } @@ -108,14 +105,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1IngressClass metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -129,14 +124,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V1IngressClass spec(V1IngressClassSpec spec) { - this.spec = spec; return this; } @@ -150,7 +143,6 @@ public V1IngressClassSpec getSpec() { return spec; } - public void setSpec(V1IngressClassSpec spec) { this.spec = spec; } @@ -217,25 +209,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1IngressClass + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1IngressClass */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1IngressClass.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1IngressClass.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1IngressClass is not found in the empty JSON string", V1IngressClass.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1IngressClass.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1IngressClass` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1IngressClass` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -244,11 +237,11 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } // validate the optional field `spec` if (jsonObj.get("spec") != null && !jsonObj.get("spec").isJsonNull()) { - V1IngressClassSpec.validateJsonObject(jsonObj.getAsJsonObject("spec")); + V1IngressClassSpec.validateJsonElement(jsonObj.get("spec")); } } @@ -272,9 +265,9 @@ public void write(JsonWriter out, V1IngressClass value) throws IOException { @Override public V1IngressClass read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -301,3 +294,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1IngressClassList.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1IngressClassList.java index a65d979bc2..1c31e179eb 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1IngressClassList.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1IngressClassList.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1ListMeta; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * IngressClassList is a collection of IngressClasses. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1IngressClassList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -75,7 +75,6 @@ public V1IngressClassList() { } public V1IngressClassList apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -89,14 +88,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1IngressClassList items(List items) { - this.items = items; return this; } @@ -118,14 +115,12 @@ public List getItems() { return items; } - public void setItems(List items) { this.items = items; } public V1IngressClassList kind(String kind) { - this.kind = kind; return this; } @@ -139,14 +134,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1IngressClassList metadata(V1ListMeta metadata) { - this.metadata = metadata; return this; } @@ -160,7 +153,6 @@ public V1ListMeta getMetadata() { return metadata; } - public void setMetadata(V1ListMeta metadata) { this.metadata = metadata; } @@ -228,32 +220,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1IngressClassList + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1IngressClassList */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1IngressClassList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1IngressClassList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1IngressClassList is not found in the empty JSON string", V1IngressClassList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1IngressClassList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1IngressClassList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1IngressClassList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1IngressClassList.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -265,14 +258,14 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); // validate the required field `items` (array) for (int i = 0; i < jsonArrayitems.size(); i++) { - V1IngressClass.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject()); + V1IngressClass.validateJsonElement(jsonArrayitems.get(i)); }; if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ListMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ListMeta.validateJsonElement(jsonObj.get("metadata")); } } @@ -296,9 +289,9 @@ public void write(JsonWriter out, V1IngressClassList value) throws IOException { @Override public V1IngressClassList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -325,3 +318,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1IngressClassParametersReference.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1IngressClassParametersReference.java index 839a3ffe40..c8ca2d28ed 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1IngressClassParametersReference.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1IngressClassParametersReference.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * IngressClassParametersReference identifies an API object. This can be used to specify a cluster or namespace-scoped resource. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1IngressClassParametersReference { public static final String SERIALIZED_NAME_API_GROUP = "apiGroup"; @SerializedName(SERIALIZED_NAME_API_GROUP) @@ -75,7 +75,6 @@ public V1IngressClassParametersReference() { } public V1IngressClassParametersReference apiGroup(String apiGroup) { - this.apiGroup = apiGroup; return this; } @@ -89,14 +88,12 @@ public String getApiGroup() { return apiGroup; } - public void setApiGroup(String apiGroup) { this.apiGroup = apiGroup; } public V1IngressClassParametersReference kind(String kind) { - this.kind = kind; return this; } @@ -110,14 +107,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1IngressClassParametersReference name(String name) { - this.name = name; return this; } @@ -131,14 +126,12 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } public V1IngressClassParametersReference namespace(String namespace) { - this.namespace = namespace; return this; } @@ -152,14 +145,12 @@ public String getNamespace() { return namespace; } - public void setNamespace(String namespace) { this.namespace = namespace; } public V1IngressClassParametersReference scope(String scope) { - this.scope = scope; return this; } @@ -173,7 +164,6 @@ public String getScope() { return scope; } - public void setScope(String scope) { this.scope = scope; } @@ -245,32 +235,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1IngressClassParametersReference + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1IngressClassParametersReference */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1IngressClassParametersReference.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1IngressClassParametersReference.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1IngressClassParametersReference is not found in the empty JSON string", V1IngressClassParametersReference.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1IngressClassParametersReference.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1IngressClassParametersReference` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1IngressClassParametersReference` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1IngressClassParametersReference.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiGroup") != null && !jsonObj.get("apiGroup").isJsonNull()) && !jsonObj.get("apiGroup").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiGroup` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiGroup").toString())); } @@ -308,9 +299,9 @@ public void write(JsonWriter out, V1IngressClassParametersReference value) throw @Override public V1IngressClassParametersReference read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -337,3 +328,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1IngressClassSpec.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1IngressClassSpec.java index 1e42021025..174e95db9e 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1IngressClassSpec.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1IngressClassSpec.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.openapi.models.V1IngressClassParametersReference; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * IngressClassSpec provides information about the class of an Ingress. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1IngressClassSpec { public static final String SERIALIZED_NAME_CONTROLLER = "controller"; @SerializedName(SERIALIZED_NAME_CONTROLLER) @@ -64,7 +64,6 @@ public V1IngressClassSpec() { } public V1IngressClassSpec controller(String controller) { - this.controller = controller; return this; } @@ -78,14 +77,12 @@ public String getController() { return controller; } - public void setController(String controller) { this.controller = controller; } public V1IngressClassSpec parameters(V1IngressClassParametersReference parameters) { - this.parameters = parameters; return this; } @@ -99,7 +96,6 @@ public V1IngressClassParametersReference getParameters() { return parameters; } - public void setParameters(V1IngressClassParametersReference parameters) { this.parameters = parameters; } @@ -160,31 +156,32 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1IngressClassSpec + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1IngressClassSpec */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1IngressClassSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1IngressClassSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1IngressClassSpec is not found in the empty JSON string", V1IngressClassSpec.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1IngressClassSpec.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1IngressClassSpec` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1IngressClassSpec` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("controller") != null && !jsonObj.get("controller").isJsonNull()) && !jsonObj.get("controller").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `controller` to be a primitive type in the JSON string but got `%s`", jsonObj.get("controller").toString())); } // validate the optional field `parameters` if (jsonObj.get("parameters") != null && !jsonObj.get("parameters").isJsonNull()) { - V1IngressClassParametersReference.validateJsonObject(jsonObj.getAsJsonObject("parameters")); + V1IngressClassParametersReference.validateJsonElement(jsonObj.get("parameters")); } } @@ -208,9 +205,9 @@ public void write(JsonWriter out, V1IngressClassSpec value) throws IOException { @Override public V1IngressClassSpec read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -237,3 +234,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1IngressList.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1IngressList.java index 787304f415..c3a3a7af64 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1IngressList.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1IngressList.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1ListMeta; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * IngressList is a collection of Ingress. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1IngressList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -75,7 +75,6 @@ public V1IngressList() { } public V1IngressList apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -89,14 +88,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1IngressList items(List items) { - this.items = items; return this; } @@ -118,14 +115,12 @@ public List getItems() { return items; } - public void setItems(List items) { this.items = items; } public V1IngressList kind(String kind) { - this.kind = kind; return this; } @@ -139,14 +134,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1IngressList metadata(V1ListMeta metadata) { - this.metadata = metadata; return this; } @@ -160,7 +153,6 @@ public V1ListMeta getMetadata() { return metadata; } - public void setMetadata(V1ListMeta metadata) { this.metadata = metadata; } @@ -228,32 +220,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1IngressList + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1IngressList */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1IngressList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1IngressList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1IngressList is not found in the empty JSON string", V1IngressList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1IngressList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1IngressList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1IngressList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1IngressList.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -265,14 +258,14 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); // validate the required field `items` (array) for (int i = 0; i < jsonArrayitems.size(); i++) { - V1Ingress.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject()); + V1Ingress.validateJsonElement(jsonArrayitems.get(i)); }; if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ListMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ListMeta.validateJsonElement(jsonObj.get("metadata")); } } @@ -296,9 +289,9 @@ public void write(JsonWriter out, V1IngressList value) throws IOException { @Override public V1IngressList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -325,3 +318,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1IngressLoadBalancerIngress.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1IngressLoadBalancerIngress.java index 7a130095df..db59c8060d 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1IngressLoadBalancerIngress.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1IngressLoadBalancerIngress.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1IngressPortStatus; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * IngressLoadBalancerIngress represents the status of a load-balancer ingress point. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1IngressLoadBalancerIngress { public static final String SERIALIZED_NAME_HOSTNAME = "hostname"; @SerializedName(SERIALIZED_NAME_HOSTNAME) @@ -64,13 +64,12 @@ public class V1IngressLoadBalancerIngress { public static final String SERIALIZED_NAME_PORTS = "ports"; @SerializedName(SERIALIZED_NAME_PORTS) - private List ports; + private List ports = new ArrayList<>(); public V1IngressLoadBalancerIngress() { } public V1IngressLoadBalancerIngress hostname(String hostname) { - this.hostname = hostname; return this; } @@ -84,14 +83,12 @@ public String getHostname() { return hostname; } - public void setHostname(String hostname) { this.hostname = hostname; } public V1IngressLoadBalancerIngress ip(String ip) { - this.ip = ip; return this; } @@ -105,14 +102,12 @@ public String getIp() { return ip; } - public void setIp(String ip) { this.ip = ip; } public V1IngressLoadBalancerIngress ports(List ports) { - this.ports = ports; return this; } @@ -134,7 +129,6 @@ public List getPorts() { return ports; } - public void setPorts(List ports) { this.ports = ports; } @@ -198,25 +192,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1IngressLoadBalancerIngress + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1IngressLoadBalancerIngress */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1IngressLoadBalancerIngress.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1IngressLoadBalancerIngress.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1IngressLoadBalancerIngress is not found in the empty JSON string", V1IngressLoadBalancerIngress.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1IngressLoadBalancerIngress.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1IngressLoadBalancerIngress` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1IngressLoadBalancerIngress` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("hostname") != null && !jsonObj.get("hostname").isJsonNull()) && !jsonObj.get("hostname").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `hostname` to be a primitive type in the JSON string but got `%s`", jsonObj.get("hostname").toString())); } @@ -233,7 +228,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `ports` (array) for (int i = 0; i < jsonArrayports.size(); i++) { - V1IngressPortStatus.validateJsonObject(jsonArrayports.get(i).getAsJsonObject()); + V1IngressPortStatus.validateJsonElement(jsonArrayports.get(i)); }; } } @@ -259,9 +254,9 @@ public void write(JsonWriter out, V1IngressLoadBalancerIngress value) throws IOE @Override public V1IngressLoadBalancerIngress read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -288,3 +283,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1IngressLoadBalancerStatus.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1IngressLoadBalancerStatus.java index d6985e3699..17870f7664 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1IngressLoadBalancerStatus.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1IngressLoadBalancerStatus.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1IngressLoadBalancerIngress; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,17 +52,16 @@ /** * IngressLoadBalancerStatus represents the status of a load-balancer. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1IngressLoadBalancerStatus { public static final String SERIALIZED_NAME_INGRESS = "ingress"; @SerializedName(SERIALIZED_NAME_INGRESS) - private List ingress; + private List ingress = new ArrayList<>(); public V1IngressLoadBalancerStatus() { } public V1IngressLoadBalancerStatus ingress(List ingress) { - this.ingress = ingress; return this; } @@ -84,7 +83,6 @@ public List getIngress() { return ingress; } - public void setIngress(List ingress) { this.ingress = ingress; } @@ -142,25 +140,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1IngressLoadBalancerStatus + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1IngressLoadBalancerStatus */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1IngressLoadBalancerStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1IngressLoadBalancerStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1IngressLoadBalancerStatus is not found in the empty JSON string", V1IngressLoadBalancerStatus.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1IngressLoadBalancerStatus.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1IngressLoadBalancerStatus` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1IngressLoadBalancerStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (jsonObj.get("ingress") != null && !jsonObj.get("ingress").isJsonNull()) { JsonArray jsonArrayingress = jsonObj.getAsJsonArray("ingress"); if (jsonArrayingress != null) { @@ -171,7 +170,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `ingress` (array) for (int i = 0; i < jsonArrayingress.size(); i++) { - V1IngressLoadBalancerIngress.validateJsonObject(jsonArrayingress.get(i).getAsJsonObject()); + V1IngressLoadBalancerIngress.validateJsonElement(jsonArrayingress.get(i)); }; } } @@ -197,9 +196,9 @@ public void write(JsonWriter out, V1IngressLoadBalancerStatus value) throws IOEx @Override public V1IngressLoadBalancerStatus read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -226,3 +225,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1IngressPortStatus.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1IngressPortStatus.java index 1d5bdd3bda..a7e8f29254 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1IngressPortStatus.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1IngressPortStatus.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * IngressPortStatus represents the error condition of a service port */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1IngressPortStatus { public static final String SERIALIZED_NAME_ERROR = "error"; @SerializedName(SERIALIZED_NAME_ERROR) @@ -67,7 +67,6 @@ public V1IngressPortStatus() { } public V1IngressPortStatus error(String error) { - this.error = error; return this; } @@ -81,14 +80,12 @@ public String getError() { return error; } - public void setError(String error) { this.error = error; } public V1IngressPortStatus port(Integer port) { - this.port = port; return this; } @@ -102,14 +99,12 @@ public Integer getPort() { return port; } - public void setPort(Integer port) { this.port = port; } public V1IngressPortStatus protocol(String protocol) { - this.protocol = protocol; return this; } @@ -123,7 +118,6 @@ public String getProtocol() { return protocol; } - public void setProtocol(String protocol) { this.protocol = protocol; } @@ -189,32 +183,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1IngressPortStatus + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1IngressPortStatus */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1IngressPortStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1IngressPortStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1IngressPortStatus is not found in the empty JSON string", V1IngressPortStatus.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1IngressPortStatus.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1IngressPortStatus` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1IngressPortStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1IngressPortStatus.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("error") != null && !jsonObj.get("error").isJsonNull()) && !jsonObj.get("error").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `error` to be a primitive type in the JSON string but got `%s`", jsonObj.get("error").toString())); } @@ -243,9 +238,9 @@ public void write(JsonWriter out, V1IngressPortStatus value) throws IOException @Override public V1IngressPortStatus read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -272,3 +267,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1IngressRule.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1IngressRule.java index 0602373d79..e5289359a8 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1IngressRule.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1IngressRule.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.openapi.models.V1HTTPIngressRuleValue; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * 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. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1IngressRule { public static final String SERIALIZED_NAME_HOST = "host"; @SerializedName(SERIALIZED_NAME_HOST) @@ -64,7 +64,6 @@ public V1IngressRule() { } public V1IngressRule host(String host) { - this.host = host; return this; } @@ -78,14 +77,12 @@ public String getHost() { return host; } - public void setHost(String host) { this.host = host; } public V1IngressRule http(V1HTTPIngressRuleValue http) { - this.http = http; return this; } @@ -99,7 +96,6 @@ public V1HTTPIngressRuleValue getHttp() { return http; } - public void setHttp(V1HTTPIngressRuleValue http) { this.http = http; } @@ -160,31 +156,32 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1IngressRule + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1IngressRule */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1IngressRule.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1IngressRule.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1IngressRule is not found in the empty JSON string", V1IngressRule.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1IngressRule.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1IngressRule` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1IngressRule` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("host") != null && !jsonObj.get("host").isJsonNull()) && !jsonObj.get("host").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `host` to be a primitive type in the JSON string but got `%s`", jsonObj.get("host").toString())); } // validate the optional field `http` if (jsonObj.get("http") != null && !jsonObj.get("http").isJsonNull()) { - V1HTTPIngressRuleValue.validateJsonObject(jsonObj.getAsJsonObject("http")); + V1HTTPIngressRuleValue.validateJsonElement(jsonObj.get("http")); } } @@ -208,9 +205,9 @@ public void write(JsonWriter out, V1IngressRule value) throws IOException { @Override public V1IngressRule read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -237,3 +234,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1IngressServiceBackend.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1IngressServiceBackend.java index 6019a9a89d..e492047bd4 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1IngressServiceBackend.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1IngressServiceBackend.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.openapi.models.V1ServiceBackendPort; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * IngressServiceBackend references a Kubernetes Service as a Backend. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1IngressServiceBackend { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) @@ -64,7 +64,6 @@ public V1IngressServiceBackend() { } public V1IngressServiceBackend name(String name) { - this.name = name; return this; } @@ -78,14 +77,12 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } public V1IngressServiceBackend port(V1ServiceBackendPort port) { - this.port = port; return this; } @@ -99,7 +96,6 @@ public V1ServiceBackendPort getPort() { return port; } - public void setPort(V1ServiceBackendPort port) { this.port = port; } @@ -161,38 +157,39 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1IngressServiceBackend + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1IngressServiceBackend */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1IngressServiceBackend.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1IngressServiceBackend.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1IngressServiceBackend is not found in the empty JSON string", V1IngressServiceBackend.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1IngressServiceBackend.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1IngressServiceBackend` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1IngressServiceBackend` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1IngressServiceBackend.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } // validate the optional field `port` if (jsonObj.get("port") != null && !jsonObj.get("port").isJsonNull()) { - V1ServiceBackendPort.validateJsonObject(jsonObj.getAsJsonObject("port")); + V1ServiceBackendPort.validateJsonElement(jsonObj.get("port")); } } @@ -216,9 +213,9 @@ public void write(JsonWriter out, V1IngressServiceBackend value) throws IOExcept @Override public V1IngressServiceBackend read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -245,3 +242,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1IngressSpec.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1IngressSpec.java index 2e70c90c14..85ea3b4251 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1IngressSpec.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1IngressSpec.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -24,6 +24,7 @@ import io.kubernetes.client.openapi.models.V1IngressTLS; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -46,7 +47,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -54,7 +54,7 @@ /** * IngressSpec describes the Ingress the user wishes to exist. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1IngressSpec { public static final String SERIALIZED_NAME_DEFAULT_BACKEND = "defaultBackend"; @SerializedName(SERIALIZED_NAME_DEFAULT_BACKEND) @@ -66,17 +66,16 @@ public class V1IngressSpec { public static final String SERIALIZED_NAME_RULES = "rules"; @SerializedName(SERIALIZED_NAME_RULES) - private List rules; + private List rules = new ArrayList<>(); public static final String SERIALIZED_NAME_TLS = "tls"; @SerializedName(SERIALIZED_NAME_TLS) - private List tls; + private List tls = new ArrayList<>(); public V1IngressSpec() { } public V1IngressSpec defaultBackend(V1IngressBackend defaultBackend) { - this.defaultBackend = defaultBackend; return this; } @@ -90,14 +89,12 @@ public V1IngressBackend getDefaultBackend() { return defaultBackend; } - public void setDefaultBackend(V1IngressBackend defaultBackend) { this.defaultBackend = defaultBackend; } public V1IngressSpec ingressClassName(String ingressClassName) { - this.ingressClassName = ingressClassName; return this; } @@ -111,14 +108,12 @@ public String getIngressClassName() { return ingressClassName; } - public void setIngressClassName(String ingressClassName) { this.ingressClassName = ingressClassName; } public V1IngressSpec rules(List rules) { - this.rules = rules; return this; } @@ -140,14 +135,12 @@ public List getRules() { return rules; } - public void setRules(List rules) { this.rules = rules; } public V1IngressSpec tls(List tls) { - this.tls = tls; return this; } @@ -169,7 +162,6 @@ public List getTls() { return tls; } - public void setTls(List tls) { this.tls = tls; } @@ -236,28 +228,29 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1IngressSpec + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1IngressSpec */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1IngressSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1IngressSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1IngressSpec is not found in the empty JSON string", V1IngressSpec.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1IngressSpec.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1IngressSpec` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1IngressSpec` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `defaultBackend` if (jsonObj.get("defaultBackend") != null && !jsonObj.get("defaultBackend").isJsonNull()) { - V1IngressBackend.validateJsonObject(jsonObj.getAsJsonObject("defaultBackend")); + V1IngressBackend.validateJsonElement(jsonObj.get("defaultBackend")); } if ((jsonObj.get("ingressClassName") != null && !jsonObj.get("ingressClassName").isJsonNull()) && !jsonObj.get("ingressClassName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `ingressClassName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ingressClassName").toString())); @@ -272,7 +265,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `rules` (array) for (int i = 0; i < jsonArrayrules.size(); i++) { - V1IngressRule.validateJsonObject(jsonArrayrules.get(i).getAsJsonObject()); + V1IngressRule.validateJsonElement(jsonArrayrules.get(i)); }; } } @@ -286,7 +279,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `tls` (array) for (int i = 0; i < jsonArraytls.size(); i++) { - V1IngressTLS.validateJsonObject(jsonArraytls.get(i).getAsJsonObject()); + V1IngressTLS.validateJsonElement(jsonArraytls.get(i)); }; } } @@ -312,9 +305,9 @@ public void write(JsonWriter out, V1IngressSpec value) throws IOException { @Override public V1IngressSpec read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -341,3 +334,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1IngressStatus.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1IngressStatus.java index 665038427c..898736de60 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1IngressStatus.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1IngressStatus.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.openapi.models.V1IngressLoadBalancerStatus; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * IngressStatus describe the current state of the Ingress. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1IngressStatus { public static final String SERIALIZED_NAME_LOAD_BALANCER = "loadBalancer"; @SerializedName(SERIALIZED_NAME_LOAD_BALANCER) @@ -60,7 +60,6 @@ public V1IngressStatus() { } public V1IngressStatus loadBalancer(V1IngressLoadBalancerStatus loadBalancer) { - this.loadBalancer = loadBalancer; return this; } @@ -74,7 +73,6 @@ public V1IngressLoadBalancerStatus getLoadBalancer() { return loadBalancer; } - public void setLoadBalancer(V1IngressLoadBalancerStatus loadBalancer) { this.loadBalancer = loadBalancer; } @@ -132,28 +130,29 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1IngressStatus + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1IngressStatus */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1IngressStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1IngressStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1IngressStatus is not found in the empty JSON string", V1IngressStatus.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1IngressStatus.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1IngressStatus` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1IngressStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `loadBalancer` if (jsonObj.get("loadBalancer") != null && !jsonObj.get("loadBalancer").isJsonNull()) { - V1IngressLoadBalancerStatus.validateJsonObject(jsonObj.getAsJsonObject("loadBalancer")); + V1IngressLoadBalancerStatus.validateJsonElement(jsonObj.get("loadBalancer")); } } @@ -177,9 +176,9 @@ public void write(JsonWriter out, V1IngressStatus value) throws IOException { @Override public V1IngressStatus read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -206,3 +205,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1IngressTLS.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1IngressTLS.java index ce1acfa284..ea4d0b8215 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1IngressTLS.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1IngressTLS.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -43,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -51,11 +51,11 @@ /** * IngressTLS describes the transport layer security associated with an ingress. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1IngressTLS { public static final String SERIALIZED_NAME_HOSTS = "hosts"; @SerializedName(SERIALIZED_NAME_HOSTS) - private List hosts; + private List hosts = new ArrayList<>(); public static final String SERIALIZED_NAME_SECRET_NAME = "secretName"; @SerializedName(SERIALIZED_NAME_SECRET_NAME) @@ -65,7 +65,6 @@ public V1IngressTLS() { } public V1IngressTLS hosts(List hosts) { - this.hosts = hosts; return this; } @@ -87,14 +86,12 @@ public List getHosts() { return hosts; } - public void setHosts(List hosts) { this.hosts = hosts; } public V1IngressTLS secretName(String secretName) { - this.secretName = secretName; return this; } @@ -108,7 +105,6 @@ public String getSecretName() { return secretName; } - public void setSecretName(String secretName) { this.secretName = secretName; } @@ -169,27 +165,28 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1IngressTLS + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1IngressTLS */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1IngressTLS.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1IngressTLS.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1IngressTLS is not found in the empty JSON string", V1IngressTLS.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1IngressTLS.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1IngressTLS` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1IngressTLS` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the optional json data is an array if present - if (jsonObj.get("hosts") != null && !jsonObj.get("hosts").isJsonArray()) { + if (jsonObj.get("hosts") != null && !jsonObj.get("hosts").isJsonNull() && !jsonObj.get("hosts").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `hosts` to be an array in the JSON string but got `%s`", jsonObj.get("hosts").toString())); } if ((jsonObj.get("secretName") != null && !jsonObj.get("secretName").isJsonNull()) && !jsonObj.get("secretName").isJsonPrimitive()) { @@ -217,9 +214,9 @@ public void write(JsonWriter out, V1IngressTLS value) throws IOException { @Override public V1IngressTLS read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -246,3 +243,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1JSONSchemaProps.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1JSONSchemaProps.java index fcfc6c17d6..0a9b68b1de 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1JSONSchemaProps.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1JSONSchemaProps.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1ValidationRule; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -47,7 +48,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -55,7 +55,7 @@ /** * JSONSchemaProps is a JSON-Schema following Specification Draft 4 (http://json-schema.org/). */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1JSONSchemaProps { public static final String SERIALIZED_NAME_$_REF = "$ref"; @SerializedName(SERIALIZED_NAME_$_REF) @@ -75,11 +75,11 @@ public class V1JSONSchemaProps { public static final String SERIALIZED_NAME_ALL_OF = "allOf"; @SerializedName(SERIALIZED_NAME_ALL_OF) - private List allOf; + private List allOf = new ArrayList<>(); public static final String SERIALIZED_NAME_ANY_OF = "anyOf"; @SerializedName(SERIALIZED_NAME_ANY_OF) - private List anyOf; + private List anyOf = new ArrayList<>(); public static final String SERIALIZED_NAME_DEFAULT = "default"; @SerializedName(SERIALIZED_NAME_DEFAULT) @@ -99,7 +99,7 @@ public class V1JSONSchemaProps { public static final String SERIALIZED_NAME_ENUM = "enum"; @SerializedName(SERIALIZED_NAME_ENUM) - private List _enum; + private List _enum = new ArrayList<>(); public static final String SERIALIZED_NAME_EXAMPLE = "example"; @SerializedName(SERIALIZED_NAME_EXAMPLE) @@ -175,7 +175,7 @@ public class V1JSONSchemaProps { public static final String SERIALIZED_NAME_ONE_OF = "oneOf"; @SerializedName(SERIALIZED_NAME_ONE_OF) - private List oneOf; + private List oneOf = new ArrayList<>(); public static final String SERIALIZED_NAME_PATTERN = "pattern"; @SerializedName(SERIALIZED_NAME_PATTERN) @@ -191,7 +191,7 @@ public class V1JSONSchemaProps { public static final String SERIALIZED_NAME_REQUIRED = "required"; @SerializedName(SERIALIZED_NAME_REQUIRED) - private List required; + private List required = new ArrayList<>(); public static final String SERIALIZED_NAME_TITLE = "title"; @SerializedName(SERIALIZED_NAME_TITLE) @@ -215,7 +215,7 @@ public class V1JSONSchemaProps { public static final String SERIALIZED_NAME_X_KUBERNETES_LIST_MAP_KEYS = "x-kubernetes-list-map-keys"; @SerializedName(SERIALIZED_NAME_X_KUBERNETES_LIST_MAP_KEYS) - private List xKubernetesListMapKeys; + private List xKubernetesListMapKeys = new ArrayList<>(); public static final String SERIALIZED_NAME_X_KUBERNETES_LIST_TYPE = "x-kubernetes-list-type"; @SerializedName(SERIALIZED_NAME_X_KUBERNETES_LIST_TYPE) @@ -231,13 +231,12 @@ public class V1JSONSchemaProps { public static final String SERIALIZED_NAME_X_KUBERNETES_VALIDATIONS = "x-kubernetes-validations"; @SerializedName(SERIALIZED_NAME_X_KUBERNETES_VALIDATIONS) - private List xKubernetesValidations; + private List xKubernetesValidations = new ArrayList<>(); public V1JSONSchemaProps() { } public V1JSONSchemaProps $ref(String $ref) { - this.$ref = $ref; return this; } @@ -251,14 +250,12 @@ public V1JSONSchemaProps() { return $ref; } - public void set$Ref(String $ref) { this.$ref = $ref; } public V1JSONSchemaProps $schema(String $schema) { - this.$schema = $schema; return this; } @@ -272,14 +269,12 @@ public V1JSONSchemaProps() { return $schema; } - public void set$Schema(String $schema) { this.$schema = $schema; } public V1JSONSchemaProps additionalItems(Object additionalItems) { - this.additionalItems = additionalItems; return this; } @@ -293,14 +288,12 @@ public Object getAdditionalItems() { return additionalItems; } - public void setAdditionalItems(Object additionalItems) { this.additionalItems = additionalItems; } public V1JSONSchemaProps additionalProperties(Object additionalProperties) { - this.additionalProperties = additionalProperties; return this; } @@ -314,14 +307,12 @@ public Object getAdditionalProperties() { return additionalProperties; } - public void setAdditionalProperties(Object additionalProperties) { this.additionalProperties = additionalProperties; } public V1JSONSchemaProps allOf(List allOf) { - this.allOf = allOf; return this; } @@ -343,14 +334,12 @@ public List getAllOf() { return allOf; } - public void setAllOf(List allOf) { this.allOf = allOf; } public V1JSONSchemaProps anyOf(List anyOf) { - this.anyOf = anyOf; return this; } @@ -372,14 +361,12 @@ public List getAnyOf() { return anyOf; } - public void setAnyOf(List anyOf) { this.anyOf = anyOf; } public V1JSONSchemaProps _default(Object _default) { - this._default = _default; return this; } @@ -393,14 +380,12 @@ public Object getDefault() { return _default; } - public void setDefault(Object _default) { this._default = _default; } public V1JSONSchemaProps definitions(Map definitions) { - this.definitions = definitions; return this; } @@ -422,14 +407,12 @@ public Map getDefinitions() { return definitions; } - public void setDefinitions(Map definitions) { this.definitions = definitions; } public V1JSONSchemaProps dependencies(Map dependencies) { - this.dependencies = dependencies; return this; } @@ -451,14 +434,12 @@ public Map getDependencies() { return dependencies; } - public void setDependencies(Map dependencies) { this.dependencies = dependencies; } public V1JSONSchemaProps description(String description) { - this.description = description; return this; } @@ -472,14 +453,12 @@ public String getDescription() { return description; } - public void setDescription(String description) { this.description = description; } public V1JSONSchemaProps _enum(List _enum) { - this._enum = _enum; return this; } @@ -501,14 +480,12 @@ public List getEnum() { return _enum; } - public void setEnum(List _enum) { this._enum = _enum; } public V1JSONSchemaProps example(Object example) { - this.example = example; return this; } @@ -522,14 +499,12 @@ public Object getExample() { return example; } - public void setExample(Object example) { this.example = example; } public V1JSONSchemaProps exclusiveMaximum(Boolean exclusiveMaximum) { - this.exclusiveMaximum = exclusiveMaximum; return this; } @@ -543,14 +518,12 @@ public Boolean getExclusiveMaximum() { return exclusiveMaximum; } - public void setExclusiveMaximum(Boolean exclusiveMaximum) { this.exclusiveMaximum = exclusiveMaximum; } public V1JSONSchemaProps exclusiveMinimum(Boolean exclusiveMinimum) { - this.exclusiveMinimum = exclusiveMinimum; return this; } @@ -564,14 +537,12 @@ public Boolean getExclusiveMinimum() { return exclusiveMinimum; } - public void setExclusiveMinimum(Boolean exclusiveMinimum) { this.exclusiveMinimum = exclusiveMinimum; } public V1JSONSchemaProps externalDocs(V1ExternalDocumentation externalDocs) { - this.externalDocs = externalDocs; return this; } @@ -585,14 +556,12 @@ public V1ExternalDocumentation getExternalDocs() { return externalDocs; } - public void setExternalDocs(V1ExternalDocumentation externalDocs) { this.externalDocs = externalDocs; } public V1JSONSchemaProps format(String format) { - this.format = format; return this; } @@ -606,14 +575,12 @@ public String getFormat() { return format; } - public void setFormat(String format) { this.format = format; } public V1JSONSchemaProps id(String id) { - this.id = id; return this; } @@ -627,14 +594,12 @@ public String getId() { return id; } - public void setId(String id) { this.id = id; } public V1JSONSchemaProps items(Object items) { - this.items = items; return this; } @@ -648,14 +613,12 @@ public Object getItems() { return items; } - public void setItems(Object items) { this.items = items; } public V1JSONSchemaProps maxItems(Long maxItems) { - this.maxItems = maxItems; return this; } @@ -669,14 +632,12 @@ public Long getMaxItems() { return maxItems; } - public void setMaxItems(Long maxItems) { this.maxItems = maxItems; } public V1JSONSchemaProps maxLength(Long maxLength) { - this.maxLength = maxLength; return this; } @@ -690,14 +651,12 @@ public Long getMaxLength() { return maxLength; } - public void setMaxLength(Long maxLength) { this.maxLength = maxLength; } public V1JSONSchemaProps maxProperties(Long maxProperties) { - this.maxProperties = maxProperties; return this; } @@ -711,14 +670,12 @@ public Long getMaxProperties() { return maxProperties; } - public void setMaxProperties(Long maxProperties) { this.maxProperties = maxProperties; } public V1JSONSchemaProps maximum(Double maximum) { - this.maximum = maximum; return this; } @@ -732,14 +689,12 @@ public Double getMaximum() { return maximum; } - public void setMaximum(Double maximum) { this.maximum = maximum; } public V1JSONSchemaProps minItems(Long minItems) { - this.minItems = minItems; return this; } @@ -753,14 +708,12 @@ public Long getMinItems() { return minItems; } - public void setMinItems(Long minItems) { this.minItems = minItems; } public V1JSONSchemaProps minLength(Long minLength) { - this.minLength = minLength; return this; } @@ -774,14 +727,12 @@ public Long getMinLength() { return minLength; } - public void setMinLength(Long minLength) { this.minLength = minLength; } public V1JSONSchemaProps minProperties(Long minProperties) { - this.minProperties = minProperties; return this; } @@ -795,14 +746,12 @@ public Long getMinProperties() { return minProperties; } - public void setMinProperties(Long minProperties) { this.minProperties = minProperties; } public V1JSONSchemaProps minimum(Double minimum) { - this.minimum = minimum; return this; } @@ -816,14 +765,12 @@ public Double getMinimum() { return minimum; } - public void setMinimum(Double minimum) { this.minimum = minimum; } public V1JSONSchemaProps multipleOf(Double multipleOf) { - this.multipleOf = multipleOf; return this; } @@ -837,14 +784,12 @@ public Double getMultipleOf() { return multipleOf; } - public void setMultipleOf(Double multipleOf) { this.multipleOf = multipleOf; } public V1JSONSchemaProps not(V1JSONSchemaProps not) { - this.not = not; return this; } @@ -858,14 +803,12 @@ public V1JSONSchemaProps getNot() { return not; } - public void setNot(V1JSONSchemaProps not) { this.not = not; } public V1JSONSchemaProps nullable(Boolean nullable) { - this.nullable = nullable; return this; } @@ -879,14 +822,12 @@ public Boolean getNullable() { return nullable; } - public void setNullable(Boolean nullable) { this.nullable = nullable; } public V1JSONSchemaProps oneOf(List oneOf) { - this.oneOf = oneOf; return this; } @@ -908,14 +849,12 @@ public List getOneOf() { return oneOf; } - public void setOneOf(List oneOf) { this.oneOf = oneOf; } public V1JSONSchemaProps pattern(String pattern) { - this.pattern = pattern; return this; } @@ -929,14 +868,12 @@ public String getPattern() { return pattern; } - public void setPattern(String pattern) { this.pattern = pattern; } public V1JSONSchemaProps patternProperties(Map patternProperties) { - this.patternProperties = patternProperties; return this; } @@ -958,14 +895,12 @@ public Map getPatternProperties() { return patternProperties; } - public void setPatternProperties(Map patternProperties) { this.patternProperties = patternProperties; } public V1JSONSchemaProps properties(Map properties) { - this.properties = properties; return this; } @@ -987,14 +922,12 @@ public Map getProperties() { return properties; } - public void setProperties(Map properties) { this.properties = properties; } public V1JSONSchemaProps required(List required) { - this.required = required; return this; } @@ -1016,14 +949,12 @@ public List getRequired() { return required; } - public void setRequired(List required) { this.required = required; } public V1JSONSchemaProps title(String title) { - this.title = title; return this; } @@ -1037,14 +968,12 @@ public String getTitle() { return title; } - public void setTitle(String title) { this.title = title; } public V1JSONSchemaProps type(String type) { - this.type = type; return this; } @@ -1058,14 +987,12 @@ public String getType() { return type; } - public void setType(String type) { this.type = type; } public V1JSONSchemaProps uniqueItems(Boolean uniqueItems) { - this.uniqueItems = uniqueItems; return this; } @@ -1079,14 +1006,12 @@ public Boolean getUniqueItems() { return uniqueItems; } - public void setUniqueItems(Boolean uniqueItems) { this.uniqueItems = uniqueItems; } public V1JSONSchemaProps xKubernetesEmbeddedResource(Boolean xKubernetesEmbeddedResource) { - this.xKubernetesEmbeddedResource = xKubernetesEmbeddedResource; return this; } @@ -1100,14 +1025,12 @@ public Boolean getxKubernetesEmbeddedResource() { return xKubernetesEmbeddedResource; } - public void setxKubernetesEmbeddedResource(Boolean xKubernetesEmbeddedResource) { this.xKubernetesEmbeddedResource = xKubernetesEmbeddedResource; } public V1JSONSchemaProps xKubernetesIntOrString(Boolean xKubernetesIntOrString) { - this.xKubernetesIntOrString = xKubernetesIntOrString; return this; } @@ -1121,14 +1044,12 @@ public Boolean getxKubernetesIntOrString() { return xKubernetesIntOrString; } - public void setxKubernetesIntOrString(Boolean xKubernetesIntOrString) { this.xKubernetesIntOrString = xKubernetesIntOrString; } public V1JSONSchemaProps xKubernetesListMapKeys(List xKubernetesListMapKeys) { - this.xKubernetesListMapKeys = xKubernetesListMapKeys; return this; } @@ -1150,14 +1071,12 @@ public List getxKubernetesListMapKeys() { return xKubernetesListMapKeys; } - public void setxKubernetesListMapKeys(List xKubernetesListMapKeys) { this.xKubernetesListMapKeys = xKubernetesListMapKeys; } public V1JSONSchemaProps xKubernetesListType(String xKubernetesListType) { - this.xKubernetesListType = xKubernetesListType; return this; } @@ -1171,14 +1090,12 @@ public String getxKubernetesListType() { return xKubernetesListType; } - public void setxKubernetesListType(String xKubernetesListType) { this.xKubernetesListType = xKubernetesListType; } public V1JSONSchemaProps xKubernetesMapType(String xKubernetesMapType) { - this.xKubernetesMapType = xKubernetesMapType; return this; } @@ -1192,14 +1109,12 @@ public String getxKubernetesMapType() { return xKubernetesMapType; } - public void setxKubernetesMapType(String xKubernetesMapType) { this.xKubernetesMapType = xKubernetesMapType; } public V1JSONSchemaProps xKubernetesPreserveUnknownFields(Boolean xKubernetesPreserveUnknownFields) { - this.xKubernetesPreserveUnknownFields = xKubernetesPreserveUnknownFields; return this; } @@ -1213,14 +1128,12 @@ public Boolean getxKubernetesPreserveUnknownFields() { return xKubernetesPreserveUnknownFields; } - public void setxKubernetesPreserveUnknownFields(Boolean xKubernetesPreserveUnknownFields) { this.xKubernetesPreserveUnknownFields = xKubernetesPreserveUnknownFields; } public V1JSONSchemaProps xKubernetesValidations(List xKubernetesValidations) { - this.xKubernetesValidations = xKubernetesValidations; return this; } @@ -1242,7 +1155,6 @@ public List getxKubernetesValidations() { return xKubernetesValidations; } - public void setxKubernetesValidations(List xKubernetesValidations) { this.xKubernetesValidations = xKubernetesValidations; } @@ -1429,25 +1341,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1JSONSchemaProps + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1JSONSchemaProps */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1JSONSchemaProps.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1JSONSchemaProps.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1JSONSchemaProps is not found in the empty JSON string", V1JSONSchemaProps.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1JSONSchemaProps.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1JSONSchemaProps` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1JSONSchemaProps` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("$ref") != null && !jsonObj.get("$ref").isJsonNull()) && !jsonObj.get("$ref").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `$ref` to be a primitive type in the JSON string but got `%s`", jsonObj.get("$ref").toString())); } @@ -1464,7 +1377,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `allOf` (array) for (int i = 0; i < jsonArrayallOf.size(); i++) { - V1JSONSchemaProps.validateJsonObject(jsonArrayallOf.get(i).getAsJsonObject()); + V1JSONSchemaProps.validateJsonElement(jsonArrayallOf.get(i)); }; } } @@ -1478,7 +1391,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `anyOf` (array) for (int i = 0; i < jsonArrayanyOf.size(); i++) { - V1JSONSchemaProps.validateJsonObject(jsonArrayanyOf.get(i).getAsJsonObject()); + V1JSONSchemaProps.validateJsonElement(jsonArrayanyOf.get(i)); }; } } @@ -1486,12 +1399,12 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("enum") != null && !jsonObj.get("enum").isJsonArray()) { + if (jsonObj.get("enum") != null && !jsonObj.get("enum").isJsonNull() && !jsonObj.get("enum").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `enum` to be an array in the JSON string but got `%s`", jsonObj.get("enum").toString())); } // validate the optional field `externalDocs` if (jsonObj.get("externalDocs") != null && !jsonObj.get("externalDocs").isJsonNull()) { - V1ExternalDocumentation.validateJsonObject(jsonObj.getAsJsonObject("externalDocs")); + V1ExternalDocumentation.validateJsonElement(jsonObj.get("externalDocs")); } if ((jsonObj.get("format") != null && !jsonObj.get("format").isJsonNull()) && !jsonObj.get("format").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `format` to be a primitive type in the JSON string but got `%s`", jsonObj.get("format").toString())); @@ -1501,7 +1414,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `not` if (jsonObj.get("not") != null && !jsonObj.get("not").isJsonNull()) { - V1JSONSchemaProps.validateJsonObject(jsonObj.getAsJsonObject("not")); + V1JSONSchemaProps.validateJsonElement(jsonObj.get("not")); } if (jsonObj.get("oneOf") != null && !jsonObj.get("oneOf").isJsonNull()) { JsonArray jsonArrayoneOf = jsonObj.getAsJsonArray("oneOf"); @@ -1513,7 +1426,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `oneOf` (array) for (int i = 0; i < jsonArrayoneOf.size(); i++) { - V1JSONSchemaProps.validateJsonObject(jsonArrayoneOf.get(i).getAsJsonObject()); + V1JSONSchemaProps.validateJsonElement(jsonArrayoneOf.get(i)); }; } } @@ -1521,7 +1434,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("Expected the field `pattern` to be a primitive type in the JSON string but got `%s`", jsonObj.get("pattern").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("required") != null && !jsonObj.get("required").isJsonArray()) { + if (jsonObj.get("required") != null && !jsonObj.get("required").isJsonNull() && !jsonObj.get("required").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `required` to be an array in the JSON string but got `%s`", jsonObj.get("required").toString())); } if ((jsonObj.get("title") != null && !jsonObj.get("title").isJsonNull()) && !jsonObj.get("title").isJsonPrimitive()) { @@ -1531,7 +1444,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("x-kubernetes-list-map-keys") != null && !jsonObj.get("x-kubernetes-list-map-keys").isJsonArray()) { + if (jsonObj.get("x-kubernetes-list-map-keys") != null && !jsonObj.get("x-kubernetes-list-map-keys").isJsonNull() && !jsonObj.get("x-kubernetes-list-map-keys").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `x-kubernetes-list-map-keys` to be an array in the JSON string but got `%s`", jsonObj.get("x-kubernetes-list-map-keys").toString())); } if ((jsonObj.get("x-kubernetes-list-type") != null && !jsonObj.get("x-kubernetes-list-type").isJsonNull()) && !jsonObj.get("x-kubernetes-list-type").isJsonPrimitive()) { @@ -1550,7 +1463,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `x-kubernetes-validations` (array) for (int i = 0; i < jsonArrayxKubernetesValidations.size(); i++) { - V1ValidationRule.validateJsonObject(jsonArrayxKubernetesValidations.get(i).getAsJsonObject()); + V1ValidationRule.validateJsonElement(jsonArrayxKubernetesValidations.get(i)); }; } } @@ -1576,9 +1489,9 @@ public void write(JsonWriter out, V1JSONSchemaProps value) throws IOException { @Override public V1JSONSchemaProps read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -1605,3 +1518,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Job.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Job.java index 8fdb2fed7c..c20fd2b2a7 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Job.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Job.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1JobStatus; import io.kubernetes.client.openapi.models.V1ObjectMeta; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * Job represents the configuration of a single job. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1Job implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -78,7 +78,6 @@ public V1Job() { } public V1Job apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -92,14 +91,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1Job kind(String kind) { - this.kind = kind; return this; } @@ -113,14 +110,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1Job metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -134,14 +129,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V1Job spec(V1JobSpec spec) { - this.spec = spec; return this; } @@ -155,14 +148,12 @@ public V1JobSpec getSpec() { return spec; } - public void setSpec(V1JobSpec spec) { this.spec = spec; } public V1Job status(V1JobStatus status) { - this.status = status; return this; } @@ -176,7 +167,6 @@ public V1JobStatus getStatus() { return status; } - public void setStatus(V1JobStatus status) { this.status = status; } @@ -246,25 +236,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1Job + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1Job */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1Job.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1Job.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1Job is not found in the empty JSON string", V1Job.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1Job.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1Job` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1Job` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -273,15 +264,15 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } // validate the optional field `spec` if (jsonObj.get("spec") != null && !jsonObj.get("spec").isJsonNull()) { - V1JobSpec.validateJsonObject(jsonObj.getAsJsonObject("spec")); + V1JobSpec.validateJsonElement(jsonObj.get("spec")); } // validate the optional field `status` if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { - V1JobStatus.validateJsonObject(jsonObj.getAsJsonObject("status")); + V1JobStatus.validateJsonElement(jsonObj.get("status")); } } @@ -305,9 +296,9 @@ public void write(JsonWriter out, V1Job value) throws IOException { @Override public V1Job read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -334,3 +325,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1JobCondition.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1JobCondition.java index 9bab9d7bf3..41f97e835b 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1JobCondition.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1JobCondition.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * JobCondition describes current state of a job. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1JobCondition { public static final String SERIALIZED_NAME_LAST_PROBE_TIME = "lastProbeTime"; @SerializedName(SERIALIZED_NAME_LAST_PROBE_TIME) @@ -80,7 +80,6 @@ public V1JobCondition() { } public V1JobCondition lastProbeTime(OffsetDateTime lastProbeTime) { - this.lastProbeTime = lastProbeTime; return this; } @@ -94,14 +93,12 @@ public OffsetDateTime getLastProbeTime() { return lastProbeTime; } - public void setLastProbeTime(OffsetDateTime lastProbeTime) { this.lastProbeTime = lastProbeTime; } public V1JobCondition lastTransitionTime(OffsetDateTime lastTransitionTime) { - this.lastTransitionTime = lastTransitionTime; return this; } @@ -115,14 +112,12 @@ public OffsetDateTime getLastTransitionTime() { return lastTransitionTime; } - public void setLastTransitionTime(OffsetDateTime lastTransitionTime) { this.lastTransitionTime = lastTransitionTime; } public V1JobCondition message(String message) { - this.message = message; return this; } @@ -136,14 +131,12 @@ public String getMessage() { return message; } - public void setMessage(String message) { this.message = message; } public V1JobCondition reason(String reason) { - this.reason = reason; return this; } @@ -157,14 +150,12 @@ public String getReason() { return reason; } - public void setReason(String reason) { this.reason = reason; } public V1JobCondition status(String status) { - this.status = status; return this; } @@ -178,14 +169,12 @@ public String getStatus() { return status; } - public void setStatus(String status) { this.status = status; } public V1JobCondition type(String type) { - this.type = type; return this; } @@ -199,7 +188,6 @@ public String getType() { return type; } - public void setType(String type) { this.type = type; } @@ -274,32 +262,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1JobCondition + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1JobCondition */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1JobCondition.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1JobCondition.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1JobCondition is not found in the empty JSON string", V1JobCondition.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1JobCondition.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1JobCondition` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1JobCondition` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1JobCondition.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); } @@ -334,9 +323,9 @@ public void write(JsonWriter out, V1JobCondition value) throws IOException { @Override public V1JobCondition read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -363,3 +352,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1JobList.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1JobList.java index 2ce994a127..0b151c98ba 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1JobList.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1JobList.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1ListMeta; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * JobList is a collection of jobs. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1JobList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -75,7 +75,6 @@ public V1JobList() { } public V1JobList apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -89,14 +88,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1JobList items(List items) { - this.items = items; return this; } @@ -118,14 +115,12 @@ public List getItems() { return items; } - public void setItems(List items) { this.items = items; } public V1JobList kind(String kind) { - this.kind = kind; return this; } @@ -139,14 +134,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1JobList metadata(V1ListMeta metadata) { - this.metadata = metadata; return this; } @@ -160,7 +153,6 @@ public V1ListMeta getMetadata() { return metadata; } - public void setMetadata(V1ListMeta metadata) { this.metadata = metadata; } @@ -228,32 +220,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1JobList + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1JobList */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1JobList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1JobList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1JobList is not found in the empty JSON string", V1JobList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1JobList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1JobList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1JobList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1JobList.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -265,14 +258,14 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); // validate the required field `items` (array) for (int i = 0; i < jsonArrayitems.size(); i++) { - V1Job.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject()); + V1Job.validateJsonElement(jsonArrayitems.get(i)); }; if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ListMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ListMeta.validateJsonElement(jsonObj.get("metadata")); } } @@ -296,9 +289,9 @@ public void write(JsonWriter out, V1JobList value) throws IOException { @Override public V1JobList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -325,3 +318,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1JobSpec.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1JobSpec.java index 4841e05ffd..41adae037d 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1JobSpec.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1JobSpec.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -24,6 +24,7 @@ import io.kubernetes.client.openapi.models.V1PodTemplateSpec; import io.kubernetes.client.openapi.models.V1SuccessPolicy; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * JobSpec describes how the job execution will look like. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1JobSpec { public static final String SERIALIZED_NAME_ACTIVE_DEADLINE_SECONDS = "activeDeadlineSeconds"; @SerializedName(SERIALIZED_NAME_ACTIVE_DEADLINE_SECONDS) @@ -123,7 +123,6 @@ public V1JobSpec() { } public V1JobSpec activeDeadlineSeconds(Long activeDeadlineSeconds) { - this.activeDeadlineSeconds = activeDeadlineSeconds; return this; } @@ -137,14 +136,12 @@ public Long getActiveDeadlineSeconds() { return activeDeadlineSeconds; } - public void setActiveDeadlineSeconds(Long activeDeadlineSeconds) { this.activeDeadlineSeconds = activeDeadlineSeconds; } public V1JobSpec backoffLimit(Integer backoffLimit) { - this.backoffLimit = backoffLimit; return this; } @@ -158,14 +155,12 @@ public Integer getBackoffLimit() { return backoffLimit; } - public void setBackoffLimit(Integer backoffLimit) { this.backoffLimit = backoffLimit; } public V1JobSpec backoffLimitPerIndex(Integer backoffLimitPerIndex) { - this.backoffLimitPerIndex = backoffLimitPerIndex; return this; } @@ -179,14 +174,12 @@ public Integer getBackoffLimitPerIndex() { return backoffLimitPerIndex; } - public void setBackoffLimitPerIndex(Integer backoffLimitPerIndex) { this.backoffLimitPerIndex = backoffLimitPerIndex; } public V1JobSpec completionMode(String completionMode) { - this.completionMode = completionMode; return this; } @@ -200,14 +193,12 @@ public String getCompletionMode() { return completionMode; } - public void setCompletionMode(String completionMode) { this.completionMode = completionMode; } public V1JobSpec completions(Integer completions) { - this.completions = completions; return this; } @@ -221,14 +212,12 @@ public Integer getCompletions() { return completions; } - public void setCompletions(Integer completions) { this.completions = completions; } public V1JobSpec managedBy(String managedBy) { - this.managedBy = managedBy; return this; } @@ -242,14 +231,12 @@ public String getManagedBy() { return managedBy; } - public void setManagedBy(String managedBy) { this.managedBy = managedBy; } public V1JobSpec manualSelector(Boolean manualSelector) { - this.manualSelector = manualSelector; return this; } @@ -263,14 +250,12 @@ public Boolean getManualSelector() { return manualSelector; } - public void setManualSelector(Boolean manualSelector) { this.manualSelector = manualSelector; } public V1JobSpec maxFailedIndexes(Integer maxFailedIndexes) { - this.maxFailedIndexes = maxFailedIndexes; return this; } @@ -284,14 +269,12 @@ public Integer getMaxFailedIndexes() { return maxFailedIndexes; } - public void setMaxFailedIndexes(Integer maxFailedIndexes) { this.maxFailedIndexes = maxFailedIndexes; } public V1JobSpec parallelism(Integer parallelism) { - this.parallelism = parallelism; return this; } @@ -305,14 +288,12 @@ public Integer getParallelism() { return parallelism; } - public void setParallelism(Integer parallelism) { this.parallelism = parallelism; } public V1JobSpec podFailurePolicy(V1PodFailurePolicy podFailurePolicy) { - this.podFailurePolicy = podFailurePolicy; return this; } @@ -326,14 +307,12 @@ public V1PodFailurePolicy getPodFailurePolicy() { return podFailurePolicy; } - public void setPodFailurePolicy(V1PodFailurePolicy podFailurePolicy) { this.podFailurePolicy = podFailurePolicy; } public V1JobSpec podReplacementPolicy(String podReplacementPolicy) { - this.podReplacementPolicy = podReplacementPolicy; return this; } @@ -347,14 +326,12 @@ public String getPodReplacementPolicy() { return podReplacementPolicy; } - public void setPodReplacementPolicy(String podReplacementPolicy) { this.podReplacementPolicy = podReplacementPolicy; } public V1JobSpec selector(V1LabelSelector selector) { - this.selector = selector; return this; } @@ -368,14 +345,12 @@ public V1LabelSelector getSelector() { return selector; } - public void setSelector(V1LabelSelector selector) { this.selector = selector; } public V1JobSpec successPolicy(V1SuccessPolicy successPolicy) { - this.successPolicy = successPolicy; return this; } @@ -389,14 +364,12 @@ public V1SuccessPolicy getSuccessPolicy() { return successPolicy; } - public void setSuccessPolicy(V1SuccessPolicy successPolicy) { this.successPolicy = successPolicy; } public V1JobSpec suspend(Boolean suspend) { - this.suspend = suspend; return this; } @@ -410,14 +383,12 @@ public Boolean getSuspend() { return suspend; } - public void setSuspend(Boolean suspend) { this.suspend = suspend; } public V1JobSpec template(V1PodTemplateSpec template) { - this.template = template; return this; } @@ -431,14 +402,12 @@ public V1PodTemplateSpec getTemplate() { return template; } - public void setTemplate(V1PodTemplateSpec template) { this.template = template; } public V1JobSpec ttlSecondsAfterFinished(Integer ttlSecondsAfterFinished) { - this.ttlSecondsAfterFinished = ttlSecondsAfterFinished; return this; } @@ -452,7 +421,6 @@ public Integer getTtlSecondsAfterFinished() { return ttlSecondsAfterFinished; } - public void setTtlSecondsAfterFinished(Integer ttlSecondsAfterFinished) { this.ttlSecondsAfterFinished = ttlSecondsAfterFinished; } @@ -556,32 +524,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1JobSpec + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1JobSpec */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1JobSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1JobSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1JobSpec is not found in the empty JSON string", V1JobSpec.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1JobSpec.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1JobSpec` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1JobSpec` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1JobSpec.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("completionMode") != null && !jsonObj.get("completionMode").isJsonNull()) && !jsonObj.get("completionMode").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `completionMode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("completionMode").toString())); } @@ -590,21 +559,21 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `podFailurePolicy` if (jsonObj.get("podFailurePolicy") != null && !jsonObj.get("podFailurePolicy").isJsonNull()) { - V1PodFailurePolicy.validateJsonObject(jsonObj.getAsJsonObject("podFailurePolicy")); + V1PodFailurePolicy.validateJsonElement(jsonObj.get("podFailurePolicy")); } if ((jsonObj.get("podReplacementPolicy") != null && !jsonObj.get("podReplacementPolicy").isJsonNull()) && !jsonObj.get("podReplacementPolicy").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `podReplacementPolicy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("podReplacementPolicy").toString())); } // validate the optional field `selector` if (jsonObj.get("selector") != null && !jsonObj.get("selector").isJsonNull()) { - V1LabelSelector.validateJsonObject(jsonObj.getAsJsonObject("selector")); + V1LabelSelector.validateJsonElement(jsonObj.get("selector")); } // validate the optional field `successPolicy` if (jsonObj.get("successPolicy") != null && !jsonObj.get("successPolicy").isJsonNull()) { - V1SuccessPolicy.validateJsonObject(jsonObj.getAsJsonObject("successPolicy")); + V1SuccessPolicy.validateJsonElement(jsonObj.get("successPolicy")); } // validate the required field `template` - V1PodTemplateSpec.validateJsonObject(jsonObj.getAsJsonObject("template")); + V1PodTemplateSpec.validateJsonElement(jsonObj.get("template")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -627,9 +596,9 @@ public void write(JsonWriter out, V1JobSpec value) throws IOException { @Override public V1JobSpec read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -656,3 +625,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1JobStatus.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1JobStatus.java index ea57177df6..374d35647b 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1JobStatus.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1JobStatus.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -24,6 +24,7 @@ import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -46,7 +47,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -54,7 +54,7 @@ /** * JobStatus represents the current state of a Job. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1JobStatus { public static final String SERIALIZED_NAME_ACTIVE = "active"; @SerializedName(SERIALIZED_NAME_ACTIVE) @@ -70,7 +70,7 @@ public class V1JobStatus { public static final String SERIALIZED_NAME_CONDITIONS = "conditions"; @SerializedName(SERIALIZED_NAME_CONDITIONS) - private List conditions; + private List conditions = new ArrayList<>(); public static final String SERIALIZED_NAME_FAILED = "failed"; @SerializedName(SERIALIZED_NAME_FAILED) @@ -104,7 +104,6 @@ public V1JobStatus() { } public V1JobStatus active(Integer active) { - this.active = active; return this; } @@ -118,14 +117,12 @@ public Integer getActive() { return active; } - public void setActive(Integer active) { this.active = active; } public V1JobStatus completedIndexes(String completedIndexes) { - this.completedIndexes = completedIndexes; return this; } @@ -139,14 +136,12 @@ public String getCompletedIndexes() { return completedIndexes; } - public void setCompletedIndexes(String completedIndexes) { this.completedIndexes = completedIndexes; } public V1JobStatus completionTime(OffsetDateTime completionTime) { - this.completionTime = completionTime; return this; } @@ -160,14 +155,12 @@ public OffsetDateTime getCompletionTime() { return completionTime; } - public void setCompletionTime(OffsetDateTime completionTime) { this.completionTime = completionTime; } public V1JobStatus conditions(List conditions) { - this.conditions = conditions; return this; } @@ -189,14 +182,12 @@ public List getConditions() { return conditions; } - public void setConditions(List conditions) { this.conditions = conditions; } public V1JobStatus failed(Integer failed) { - this.failed = failed; return this; } @@ -210,14 +201,12 @@ public Integer getFailed() { return failed; } - public void setFailed(Integer failed) { this.failed = failed; } public V1JobStatus failedIndexes(String failedIndexes) { - this.failedIndexes = failedIndexes; return this; } @@ -231,14 +220,12 @@ public String getFailedIndexes() { return failedIndexes; } - public void setFailedIndexes(String failedIndexes) { this.failedIndexes = failedIndexes; } public V1JobStatus ready(Integer ready) { - this.ready = ready; return this; } @@ -252,14 +239,12 @@ public Integer getReady() { return ready; } - public void setReady(Integer ready) { this.ready = ready; } public V1JobStatus startTime(OffsetDateTime startTime) { - this.startTime = startTime; return this; } @@ -273,14 +258,12 @@ public OffsetDateTime getStartTime() { return startTime; } - public void setStartTime(OffsetDateTime startTime) { this.startTime = startTime; } public V1JobStatus succeeded(Integer succeeded) { - this.succeeded = succeeded; return this; } @@ -294,14 +277,12 @@ public Integer getSucceeded() { return succeeded; } - public void setSucceeded(Integer succeeded) { this.succeeded = succeeded; } public V1JobStatus terminating(Integer terminating) { - this.terminating = terminating; return this; } @@ -315,14 +296,12 @@ public Integer getTerminating() { return terminating; } - public void setTerminating(Integer terminating) { this.terminating = terminating; } public V1JobStatus uncountedTerminatedPods(V1UncountedTerminatedPods uncountedTerminatedPods) { - this.uncountedTerminatedPods = uncountedTerminatedPods; return this; } @@ -336,7 +315,6 @@ public V1UncountedTerminatedPods getUncountedTerminatedPods() { return uncountedTerminatedPods; } - public void setUncountedTerminatedPods(V1UncountedTerminatedPods uncountedTerminatedPods) { this.uncountedTerminatedPods = uncountedTerminatedPods; } @@ -424,25 +402,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1JobStatus + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1JobStatus */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1JobStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1JobStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1JobStatus is not found in the empty JSON string", V1JobStatus.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1JobStatus.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1JobStatus` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1JobStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("completedIndexes") != null && !jsonObj.get("completedIndexes").isJsonNull()) && !jsonObj.get("completedIndexes").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `completedIndexes` to be a primitive type in the JSON string but got `%s`", jsonObj.get("completedIndexes").toString())); } @@ -456,7 +435,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `conditions` (array) for (int i = 0; i < jsonArrayconditions.size(); i++) { - V1JobCondition.validateJsonObject(jsonArrayconditions.get(i).getAsJsonObject()); + V1JobCondition.validateJsonElement(jsonArrayconditions.get(i)); }; } } @@ -465,7 +444,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `uncountedTerminatedPods` if (jsonObj.get("uncountedTerminatedPods") != null && !jsonObj.get("uncountedTerminatedPods").isJsonNull()) { - V1UncountedTerminatedPods.validateJsonObject(jsonObj.getAsJsonObject("uncountedTerminatedPods")); + V1UncountedTerminatedPods.validateJsonElement(jsonObj.get("uncountedTerminatedPods")); } } @@ -489,9 +468,9 @@ public void write(JsonWriter out, V1JobStatus value) throws IOException { @Override public V1JobStatus read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -518,3 +497,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1JobTemplateSpec.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1JobTemplateSpec.java index 4c3b9b36b9..8999be0a40 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1JobTemplateSpec.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1JobTemplateSpec.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1JobSpec; import io.kubernetes.client.openapi.models.V1ObjectMeta; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -43,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -51,7 +51,7 @@ /** * JobTemplateSpec describes the data a Job should have when created from a template */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1JobTemplateSpec { public static final String SERIALIZED_NAME_METADATA = "metadata"; @SerializedName(SERIALIZED_NAME_METADATA) @@ -65,7 +65,6 @@ public V1JobTemplateSpec() { } public V1JobTemplateSpec metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -79,14 +78,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V1JobTemplateSpec spec(V1JobSpec spec) { - this.spec = spec; return this; } @@ -100,7 +97,6 @@ public V1JobSpec getSpec() { return spec; } - public void setSpec(V1JobSpec spec) { this.spec = spec; } @@ -161,32 +157,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1JobTemplateSpec + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1JobTemplateSpec */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1JobTemplateSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1JobTemplateSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1JobTemplateSpec is not found in the empty JSON string", V1JobTemplateSpec.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1JobTemplateSpec.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1JobTemplateSpec` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1JobTemplateSpec` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } // validate the optional field `spec` if (jsonObj.get("spec") != null && !jsonObj.get("spec").isJsonNull()) { - V1JobSpec.validateJsonObject(jsonObj.getAsJsonObject("spec")); + V1JobSpec.validateJsonElement(jsonObj.get("spec")); } } @@ -210,9 +207,9 @@ public void write(JsonWriter out, V1JobTemplateSpec value) throws IOException { @Override public V1JobTemplateSpec read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -239,3 +236,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1KeyToPath.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1KeyToPath.java index 69c44380c2..643c50ac5b 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1KeyToPath.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1KeyToPath.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * Maps a string key to a path within a volume. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1KeyToPath { public static final String SERIALIZED_NAME_KEY = "key"; @SerializedName(SERIALIZED_NAME_KEY) @@ -67,7 +67,6 @@ public V1KeyToPath() { } public V1KeyToPath key(String key) { - this.key = key; return this; } @@ -81,14 +80,12 @@ public String getKey() { return key; } - public void setKey(String key) { this.key = key; } public V1KeyToPath mode(Integer mode) { - this.mode = mode; return this; } @@ -102,14 +99,12 @@ public Integer getMode() { return mode; } - public void setMode(Integer mode) { this.mode = mode; } public V1KeyToPath path(String path) { - this.path = path; return this; } @@ -123,7 +118,6 @@ public String getPath() { return path; } - public void setPath(String path) { this.path = path; } @@ -189,32 +183,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1KeyToPath + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1KeyToPath */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1KeyToPath.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1KeyToPath.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1KeyToPath is not found in the empty JSON string", V1KeyToPath.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1KeyToPath.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1KeyToPath` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1KeyToPath` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1KeyToPath.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("key").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `key` to be a primitive type in the JSON string but got `%s`", jsonObj.get("key").toString())); } @@ -243,9 +238,9 @@ public void write(JsonWriter out, V1KeyToPath value) throws IOException { @Override public V1KeyToPath read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -272,3 +267,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1LabelSelector.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1LabelSelector.java index 4788ca015a..ecac324831 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1LabelSelector.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1LabelSelector.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1LabelSelectorRequirement; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -46,7 +47,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -54,11 +54,11 @@ /** * 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. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1LabelSelector { public static final String SERIALIZED_NAME_MATCH_EXPRESSIONS = "matchExpressions"; @SerializedName(SERIALIZED_NAME_MATCH_EXPRESSIONS) - private List matchExpressions; + private List matchExpressions = new ArrayList<>(); public static final String SERIALIZED_NAME_MATCH_LABELS = "matchLabels"; @SerializedName(SERIALIZED_NAME_MATCH_LABELS) @@ -68,7 +68,6 @@ public V1LabelSelector() { } public V1LabelSelector matchExpressions(List matchExpressions) { - this.matchExpressions = matchExpressions; return this; } @@ -90,14 +89,12 @@ public List getMatchExpressions() { return matchExpressions; } - public void setMatchExpressions(List matchExpressions) { this.matchExpressions = matchExpressions; } public V1LabelSelector matchLabels(Map matchLabels) { - this.matchLabels = matchLabels; return this; } @@ -119,7 +116,6 @@ public Map getMatchLabels() { return matchLabels; } - public void setMatchLabels(Map matchLabels) { this.matchLabels = matchLabels; } @@ -180,25 +176,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1LabelSelector + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1LabelSelector */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1LabelSelector.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1LabelSelector.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1LabelSelector is not found in the empty JSON string", V1LabelSelector.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1LabelSelector.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1LabelSelector` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1LabelSelector` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (jsonObj.get("matchExpressions") != null && !jsonObj.get("matchExpressions").isJsonNull()) { JsonArray jsonArraymatchExpressions = jsonObj.getAsJsonArray("matchExpressions"); if (jsonArraymatchExpressions != null) { @@ -209,7 +206,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `matchExpressions` (array) for (int i = 0; i < jsonArraymatchExpressions.size(); i++) { - V1LabelSelectorRequirement.validateJsonObject(jsonArraymatchExpressions.get(i).getAsJsonObject()); + V1LabelSelectorRequirement.validateJsonElement(jsonArraymatchExpressions.get(i)); }; } } @@ -235,9 +232,9 @@ public void write(JsonWriter out, V1LabelSelector value) throws IOException { @Override public V1LabelSelector read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -264,3 +261,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1LabelSelectorRequirement.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1LabelSelectorRequirement.java index d82a9a4cd0..736534f2cf 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1LabelSelectorRequirement.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1LabelSelectorRequirement.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -43,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -51,7 +51,7 @@ /** * A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1LabelSelectorRequirement { public static final String SERIALIZED_NAME_KEY = "key"; @SerializedName(SERIALIZED_NAME_KEY) @@ -63,13 +63,12 @@ public class V1LabelSelectorRequirement { public static final String SERIALIZED_NAME_VALUES = "values"; @SerializedName(SERIALIZED_NAME_VALUES) - private List values; + private List values = new ArrayList<>(); public V1LabelSelectorRequirement() { } public V1LabelSelectorRequirement key(String key) { - this.key = key; return this; } @@ -83,14 +82,12 @@ public String getKey() { return key; } - public void setKey(String key) { this.key = key; } public V1LabelSelectorRequirement operator(String operator) { - this.operator = operator; return this; } @@ -104,14 +101,12 @@ public String getOperator() { return operator; } - public void setOperator(String operator) { this.operator = operator; } public V1LabelSelectorRequirement values(List values) { - this.values = values; return this; } @@ -133,7 +128,6 @@ public List getValues() { return values; } - public void setValues(List values) { this.values = values; } @@ -199,32 +193,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1LabelSelectorRequirement + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1LabelSelectorRequirement */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1LabelSelectorRequirement.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1LabelSelectorRequirement.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1LabelSelectorRequirement is not found in the empty JSON string", V1LabelSelectorRequirement.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1LabelSelectorRequirement.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1LabelSelectorRequirement` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1LabelSelectorRequirement` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1LabelSelectorRequirement.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("key").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `key` to be a primitive type in the JSON string but got `%s`", jsonObj.get("key").toString())); } @@ -232,7 +227,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("Expected the field `operator` to be a primitive type in the JSON string but got `%s`", jsonObj.get("operator").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("values") != null && !jsonObj.get("values").isJsonArray()) { + if (jsonObj.get("values") != null && !jsonObj.get("values").isJsonNull() && !jsonObj.get("values").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `values` to be an array in the JSON string but got `%s`", jsonObj.get("values").toString())); } } @@ -257,9 +252,9 @@ public void write(JsonWriter out, V1LabelSelectorRequirement value) throws IOExc @Override public V1LabelSelectorRequirement read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -286,3 +281,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Lease.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Lease.java index 4b5379a47b..7c38d86308 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Lease.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Lease.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1LeaseSpec; import io.kubernetes.client.openapi.models.V1ObjectMeta; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -43,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -51,7 +51,7 @@ /** * Lease defines a lease concept. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1Lease implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -73,7 +73,6 @@ public V1Lease() { } public V1Lease apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -87,14 +86,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1Lease kind(String kind) { - this.kind = kind; return this; } @@ -108,14 +105,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1Lease metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -129,14 +124,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V1Lease spec(V1LeaseSpec spec) { - this.spec = spec; return this; } @@ -150,7 +143,6 @@ public V1LeaseSpec getSpec() { return spec; } - public void setSpec(V1LeaseSpec spec) { this.spec = spec; } @@ -217,25 +209,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1Lease + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1Lease */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1Lease.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1Lease.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1Lease is not found in the empty JSON string", V1Lease.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1Lease.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1Lease` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1Lease` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -244,11 +237,11 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } // validate the optional field `spec` if (jsonObj.get("spec") != null && !jsonObj.get("spec").isJsonNull()) { - V1LeaseSpec.validateJsonObject(jsonObj.getAsJsonObject("spec")); + V1LeaseSpec.validateJsonElement(jsonObj.get("spec")); } } @@ -272,9 +265,9 @@ public void write(JsonWriter out, V1Lease value) throws IOException { @Override public V1Lease read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -301,3 +294,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1LeaseList.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1LeaseList.java index 9cfcc80b59..1ffdc915db 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1LeaseList.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1LeaseList.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1ListMeta; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * LeaseList is a list of Lease objects. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1LeaseList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -75,7 +75,6 @@ public V1LeaseList() { } public V1LeaseList apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -89,14 +88,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1LeaseList items(List items) { - this.items = items; return this; } @@ -118,14 +115,12 @@ public List getItems() { return items; } - public void setItems(List items) { this.items = items; } public V1LeaseList kind(String kind) { - this.kind = kind; return this; } @@ -139,14 +134,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1LeaseList metadata(V1ListMeta metadata) { - this.metadata = metadata; return this; } @@ -160,7 +153,6 @@ public V1ListMeta getMetadata() { return metadata; } - public void setMetadata(V1ListMeta metadata) { this.metadata = metadata; } @@ -228,32 +220,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1LeaseList + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1LeaseList */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1LeaseList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1LeaseList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1LeaseList is not found in the empty JSON string", V1LeaseList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1LeaseList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1LeaseList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1LeaseList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1LeaseList.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -265,14 +258,14 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); // validate the required field `items` (array) for (int i = 0; i < jsonArrayitems.size(); i++) { - V1Lease.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject()); + V1Lease.validateJsonElement(jsonArrayitems.get(i)); }; if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ListMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ListMeta.validateJsonElement(jsonObj.get("metadata")); } } @@ -296,9 +289,9 @@ public void write(JsonWriter out, V1LeaseList value) throws IOException { @Override public V1LeaseList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -325,3 +318,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1LeaseSpec.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1LeaseSpec.java index 1d3389c6fb..cf7cd8d426 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1LeaseSpec.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1LeaseSpec.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * LeaseSpec is a specification of a Lease. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1LeaseSpec { public static final String SERIALIZED_NAME_ACQUIRE_TIME = "acquireTime"; @SerializedName(SERIALIZED_NAME_ACQUIRE_TIME) @@ -76,7 +76,6 @@ public V1LeaseSpec() { } public V1LeaseSpec acquireTime(OffsetDateTime acquireTime) { - this.acquireTime = acquireTime; return this; } @@ -90,14 +89,12 @@ public OffsetDateTime getAcquireTime() { return acquireTime; } - public void setAcquireTime(OffsetDateTime acquireTime) { this.acquireTime = acquireTime; } public V1LeaseSpec holderIdentity(String holderIdentity) { - this.holderIdentity = holderIdentity; return this; } @@ -111,14 +108,12 @@ public String getHolderIdentity() { return holderIdentity; } - public void setHolderIdentity(String holderIdentity) { this.holderIdentity = holderIdentity; } public V1LeaseSpec leaseDurationSeconds(Integer leaseDurationSeconds) { - this.leaseDurationSeconds = leaseDurationSeconds; return this; } @@ -132,14 +127,12 @@ public Integer getLeaseDurationSeconds() { return leaseDurationSeconds; } - public void setLeaseDurationSeconds(Integer leaseDurationSeconds) { this.leaseDurationSeconds = leaseDurationSeconds; } public V1LeaseSpec leaseTransitions(Integer leaseTransitions) { - this.leaseTransitions = leaseTransitions; return this; } @@ -153,14 +146,12 @@ public Integer getLeaseTransitions() { return leaseTransitions; } - public void setLeaseTransitions(Integer leaseTransitions) { this.leaseTransitions = leaseTransitions; } public V1LeaseSpec renewTime(OffsetDateTime renewTime) { - this.renewTime = renewTime; return this; } @@ -174,7 +165,6 @@ public OffsetDateTime getRenewTime() { return renewTime; } - public void setRenewTime(OffsetDateTime renewTime) { this.renewTime = renewTime; } @@ -244,25 +234,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1LeaseSpec + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1LeaseSpec */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1LeaseSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1LeaseSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1LeaseSpec is not found in the empty JSON string", V1LeaseSpec.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1LeaseSpec.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1LeaseSpec` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1LeaseSpec` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("holderIdentity") != null && !jsonObj.get("holderIdentity").isJsonNull()) && !jsonObj.get("holderIdentity").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `holderIdentity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("holderIdentity").toString())); } @@ -288,9 +279,9 @@ public void write(JsonWriter out, V1LeaseSpec value) throws IOException { @Override public V1LeaseSpec read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -317,3 +308,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Lifecycle.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Lifecycle.java index cc484d2e11..b9801987d1 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Lifecycle.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Lifecycle.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.openapi.models.V1LifecycleHandler; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * 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. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1Lifecycle { public static final String SERIALIZED_NAME_POST_START = "postStart"; @SerializedName(SERIALIZED_NAME_POST_START) @@ -64,7 +64,6 @@ public V1Lifecycle() { } public V1Lifecycle postStart(V1LifecycleHandler postStart) { - this.postStart = postStart; return this; } @@ -78,14 +77,12 @@ public V1LifecycleHandler getPostStart() { return postStart; } - public void setPostStart(V1LifecycleHandler postStart) { this.postStart = postStart; } public V1Lifecycle preStop(V1LifecycleHandler preStop) { - this.preStop = preStop; return this; } @@ -99,7 +96,6 @@ public V1LifecycleHandler getPreStop() { return preStop; } - public void setPreStop(V1LifecycleHandler preStop) { this.preStop = preStop; } @@ -160,32 +156,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1Lifecycle + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1Lifecycle */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1Lifecycle.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1Lifecycle.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1Lifecycle is not found in the empty JSON string", V1Lifecycle.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1Lifecycle.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1Lifecycle` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1Lifecycle` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `postStart` if (jsonObj.get("postStart") != null && !jsonObj.get("postStart").isJsonNull()) { - V1LifecycleHandler.validateJsonObject(jsonObj.getAsJsonObject("postStart")); + V1LifecycleHandler.validateJsonElement(jsonObj.get("postStart")); } // validate the optional field `preStop` if (jsonObj.get("preStop") != null && !jsonObj.get("preStop").isJsonNull()) { - V1LifecycleHandler.validateJsonObject(jsonObj.getAsJsonObject("preStop")); + V1LifecycleHandler.validateJsonElement(jsonObj.get("preStop")); } } @@ -209,9 +206,9 @@ public void write(JsonWriter out, V1Lifecycle value) throws IOException { @Override public V1Lifecycle read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -238,3 +235,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1LifecycleHandler.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1LifecycleHandler.java index 4bc74440d7..a563254a8f 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1LifecycleHandler.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1LifecycleHandler.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -24,6 +24,7 @@ import io.kubernetes.client.openapi.models.V1SleepAction; import io.kubernetes.client.openapi.models.V1TCPSocketAction; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * LifecycleHandler defines a specific action that should be taken in a lifecycle hook. One and only one of the fields, except TCPSocket must be specified. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1LifecycleHandler { public static final String SERIALIZED_NAME_EXEC = "exec"; @SerializedName(SERIALIZED_NAME_EXEC) @@ -75,7 +75,6 @@ public V1LifecycleHandler() { } public V1LifecycleHandler exec(V1ExecAction exec) { - this.exec = exec; return this; } @@ -89,14 +88,12 @@ public V1ExecAction getExec() { return exec; } - public void setExec(V1ExecAction exec) { this.exec = exec; } public V1LifecycleHandler httpGet(V1HTTPGetAction httpGet) { - this.httpGet = httpGet; return this; } @@ -110,14 +107,12 @@ public V1HTTPGetAction getHttpGet() { return httpGet; } - public void setHttpGet(V1HTTPGetAction httpGet) { this.httpGet = httpGet; } public V1LifecycleHandler sleep(V1SleepAction sleep) { - this.sleep = sleep; return this; } @@ -131,14 +126,12 @@ public V1SleepAction getSleep() { return sleep; } - public void setSleep(V1SleepAction sleep) { this.sleep = sleep; } public V1LifecycleHandler tcpSocket(V1TCPSocketAction tcpSocket) { - this.tcpSocket = tcpSocket; return this; } @@ -152,7 +145,6 @@ public V1TCPSocketAction getTcpSocket() { return tcpSocket; } - public void setTcpSocket(V1TCPSocketAction tcpSocket) { this.tcpSocket = tcpSocket; } @@ -219,40 +211,41 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1LifecycleHandler + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1LifecycleHandler */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1LifecycleHandler.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1LifecycleHandler.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1LifecycleHandler is not found in the empty JSON string", V1LifecycleHandler.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1LifecycleHandler.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1LifecycleHandler` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1LifecycleHandler` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `exec` if (jsonObj.get("exec") != null && !jsonObj.get("exec").isJsonNull()) { - V1ExecAction.validateJsonObject(jsonObj.getAsJsonObject("exec")); + V1ExecAction.validateJsonElement(jsonObj.get("exec")); } // validate the optional field `httpGet` if (jsonObj.get("httpGet") != null && !jsonObj.get("httpGet").isJsonNull()) { - V1HTTPGetAction.validateJsonObject(jsonObj.getAsJsonObject("httpGet")); + V1HTTPGetAction.validateJsonElement(jsonObj.get("httpGet")); } // validate the optional field `sleep` if (jsonObj.get("sleep") != null && !jsonObj.get("sleep").isJsonNull()) { - V1SleepAction.validateJsonObject(jsonObj.getAsJsonObject("sleep")); + V1SleepAction.validateJsonElement(jsonObj.get("sleep")); } // validate the optional field `tcpSocket` if (jsonObj.get("tcpSocket") != null && !jsonObj.get("tcpSocket").isJsonNull()) { - V1TCPSocketAction.validateJsonObject(jsonObj.getAsJsonObject("tcpSocket")); + V1TCPSocketAction.validateJsonElement(jsonObj.get("tcpSocket")); } } @@ -276,9 +269,9 @@ public void write(JsonWriter out, V1LifecycleHandler value) throws IOException { @Override public V1LifecycleHandler read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -305,3 +298,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1LimitRange.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1LimitRange.java index 73a5b30e40..577880b320 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1LimitRange.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1LimitRange.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1LimitRangeSpec; import io.kubernetes.client.openapi.models.V1ObjectMeta; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -43,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -51,7 +51,7 @@ /** * LimitRange sets resource usage limits for each kind of resource in a Namespace. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1LimitRange implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -73,7 +73,6 @@ public V1LimitRange() { } public V1LimitRange apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -87,14 +86,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1LimitRange kind(String kind) { - this.kind = kind; return this; } @@ -108,14 +105,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1LimitRange metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -129,14 +124,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V1LimitRange spec(V1LimitRangeSpec spec) { - this.spec = spec; return this; } @@ -150,7 +143,6 @@ public V1LimitRangeSpec getSpec() { return spec; } - public void setSpec(V1LimitRangeSpec spec) { this.spec = spec; } @@ -217,25 +209,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1LimitRange + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1LimitRange */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1LimitRange.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1LimitRange.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1LimitRange is not found in the empty JSON string", V1LimitRange.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1LimitRange.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1LimitRange` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1LimitRange` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -244,11 +237,11 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } // validate the optional field `spec` if (jsonObj.get("spec") != null && !jsonObj.get("spec").isJsonNull()) { - V1LimitRangeSpec.validateJsonObject(jsonObj.getAsJsonObject("spec")); + V1LimitRangeSpec.validateJsonElement(jsonObj.get("spec")); } } @@ -272,9 +265,9 @@ public void write(JsonWriter out, V1LimitRange value) throws IOException { @Override public V1LimitRange read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -301,3 +294,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1LimitRangeItem.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1LimitRangeItem.java index 811fc25303..4a70a47ed8 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1LimitRangeItem.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1LimitRangeItem.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.custom.Quantity; import java.io.IOException; +import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * LimitRangeItem defines a min/max usage limit for any resource that matches on kind. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1LimitRangeItem { public static final String SERIALIZED_NAME_DEFAULT = "default"; @SerializedName(SERIALIZED_NAME_DEFAULT) @@ -82,7 +82,6 @@ public V1LimitRangeItem() { } public V1LimitRangeItem _default(Map _default) { - this._default = _default; return this; } @@ -104,14 +103,12 @@ public Map getDefault() { return _default; } - public void setDefault(Map _default) { this._default = _default; } public V1LimitRangeItem defaultRequest(Map defaultRequest) { - this.defaultRequest = defaultRequest; return this; } @@ -133,14 +130,12 @@ public Map getDefaultRequest() { return defaultRequest; } - public void setDefaultRequest(Map defaultRequest) { this.defaultRequest = defaultRequest; } public V1LimitRangeItem max(Map max) { - this.max = max; return this; } @@ -162,14 +157,12 @@ public Map getMax() { return max; } - public void setMax(Map max) { this.max = max; } public V1LimitRangeItem maxLimitRequestRatio(Map maxLimitRequestRatio) { - this.maxLimitRequestRatio = maxLimitRequestRatio; return this; } @@ -191,14 +184,12 @@ public Map getMaxLimitRequestRatio() { return maxLimitRequestRatio; } - public void setMaxLimitRequestRatio(Map maxLimitRequestRatio) { this.maxLimitRequestRatio = maxLimitRequestRatio; } public V1LimitRangeItem min(Map min) { - this.min = min; return this; } @@ -220,14 +211,12 @@ public Map getMin() { return min; } - public void setMin(Map min) { this.min = min; } public V1LimitRangeItem type(String type) { - this.type = type; return this; } @@ -241,7 +230,6 @@ public String getType() { return type; } - public void setType(String type) { this.type = type; } @@ -315,32 +303,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1LimitRangeItem + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1LimitRangeItem */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1LimitRangeItem.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1LimitRangeItem.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1LimitRangeItem is not found in the empty JSON string", V1LimitRangeItem.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1LimitRangeItem.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1LimitRangeItem` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1LimitRangeItem` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1LimitRangeItem.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } @@ -366,9 +355,9 @@ public void write(JsonWriter out, V1LimitRangeItem value) throws IOException { @Override public V1LimitRangeItem read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -395,3 +384,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1LimitRangeList.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1LimitRangeList.java index e40ca2b4e1..a4b17c866a 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1LimitRangeList.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1LimitRangeList.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1ListMeta; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * LimitRangeList is a list of LimitRange items. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1LimitRangeList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -75,7 +75,6 @@ public V1LimitRangeList() { } public V1LimitRangeList apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -89,14 +88,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1LimitRangeList items(List items) { - this.items = items; return this; } @@ -118,14 +115,12 @@ public List getItems() { return items; } - public void setItems(List items) { this.items = items; } public V1LimitRangeList kind(String kind) { - this.kind = kind; return this; } @@ -139,14 +134,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1LimitRangeList metadata(V1ListMeta metadata) { - this.metadata = metadata; return this; } @@ -160,7 +153,6 @@ public V1ListMeta getMetadata() { return metadata; } - public void setMetadata(V1ListMeta metadata) { this.metadata = metadata; } @@ -228,32 +220,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1LimitRangeList + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1LimitRangeList */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1LimitRangeList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1LimitRangeList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1LimitRangeList is not found in the empty JSON string", V1LimitRangeList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1LimitRangeList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1LimitRangeList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1LimitRangeList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1LimitRangeList.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -265,14 +258,14 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); // validate the required field `items` (array) for (int i = 0; i < jsonArrayitems.size(); i++) { - V1LimitRange.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject()); + V1LimitRange.validateJsonElement(jsonArrayitems.get(i)); }; if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ListMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ListMeta.validateJsonElement(jsonObj.get("metadata")); } } @@ -296,9 +289,9 @@ public void write(JsonWriter out, V1LimitRangeList value) throws IOException { @Override public V1LimitRangeList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -325,3 +318,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1LimitRangeSpec.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1LimitRangeSpec.java index d109068d48..489569910d 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1LimitRangeSpec.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1LimitRangeSpec.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1LimitRangeItem; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * LimitRangeSpec defines a min/max usage limit for resources that match on kind. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1LimitRangeSpec { public static final String SERIALIZED_NAME_LIMITS = "limits"; @SerializedName(SERIALIZED_NAME_LIMITS) @@ -62,7 +62,6 @@ public V1LimitRangeSpec() { } public V1LimitRangeSpec limits(List limits) { - this.limits = limits; return this; } @@ -84,7 +83,6 @@ public List getLimits() { return limits; } - public void setLimits(List limits) { this.limits = limits; } @@ -143,32 +141,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1LimitRangeSpec + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1LimitRangeSpec */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1LimitRangeSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1LimitRangeSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1LimitRangeSpec is not found in the empty JSON string", V1LimitRangeSpec.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1LimitRangeSpec.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1LimitRangeSpec` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1LimitRangeSpec` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1LimitRangeSpec.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the json data is an array if (!jsonObj.get("limits").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `limits` to be an array in the JSON string but got `%s`", jsonObj.get("limits").toString())); @@ -177,7 +176,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArraylimits = jsonObj.getAsJsonArray("limits"); // validate the required field `limits` (array) for (int i = 0; i < jsonArraylimits.size(); i++) { - V1LimitRangeItem.validateJsonObject(jsonArraylimits.get(i).getAsJsonObject()); + V1LimitRangeItem.validateJsonElement(jsonArraylimits.get(i)); }; } @@ -201,9 +200,9 @@ public void write(JsonWriter out, V1LimitRangeSpec value) throws IOException { @Override public V1LimitRangeSpec read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -230,3 +229,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1LimitResponse.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1LimitResponse.java index 24ee06d337..8e679cc88d 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1LimitResponse.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1LimitResponse.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.openapi.models.V1QueuingConfiguration; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * LimitResponse defines how to handle requests that can not be executed right now. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1LimitResponse { public static final String SERIALIZED_NAME_QUEUING = "queuing"; @SerializedName(SERIALIZED_NAME_QUEUING) @@ -64,7 +64,6 @@ public V1LimitResponse() { } public V1LimitResponse queuing(V1QueuingConfiguration queuing) { - this.queuing = queuing; return this; } @@ -78,14 +77,12 @@ public V1QueuingConfiguration getQueuing() { return queuing; } - public void setQueuing(V1QueuingConfiguration queuing) { this.queuing = queuing; } public V1LimitResponse type(String type) { - this.type = type; return this; } @@ -99,7 +96,6 @@ public String getType() { return type; } - public void setType(String type) { this.type = type; } @@ -161,35 +157,36 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1LimitResponse + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1LimitResponse */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1LimitResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1LimitResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1LimitResponse is not found in the empty JSON string", V1LimitResponse.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1LimitResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1LimitResponse` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1LimitResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1LimitResponse.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `queuing` if (jsonObj.get("queuing") != null && !jsonObj.get("queuing").isJsonNull()) { - V1QueuingConfiguration.validateJsonObject(jsonObj.getAsJsonObject("queuing")); + V1QueuingConfiguration.validateJsonElement(jsonObj.get("queuing")); } if (!jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); @@ -216,9 +213,9 @@ public void write(JsonWriter out, V1LimitResponse value) throws IOException { @Override public V1LimitResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -245,3 +242,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1LimitedPriorityLevelConfiguration.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1LimitedPriorityLevelConfiguration.java index 7f34df963a..c45ab49a17 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1LimitedPriorityLevelConfiguration.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1LimitedPriorityLevelConfiguration.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.openapi.models.V1LimitResponse; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * LimitedPriorityLevelConfiguration specifies how to handle requests that are subject to limits. It addresses two issues: - How are requests for this priority level limited? - What should be done with requests that exceed the limit? */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1LimitedPriorityLevelConfiguration { public static final String SERIALIZED_NAME_BORROWING_LIMIT_PERCENT = "borrowingLimitPercent"; @SerializedName(SERIALIZED_NAME_BORROWING_LIMIT_PERCENT) @@ -72,7 +72,6 @@ public V1LimitedPriorityLevelConfiguration() { } public V1LimitedPriorityLevelConfiguration borrowingLimitPercent(Integer borrowingLimitPercent) { - this.borrowingLimitPercent = borrowingLimitPercent; return this; } @@ -86,14 +85,12 @@ public Integer getBorrowingLimitPercent() { return borrowingLimitPercent; } - public void setBorrowingLimitPercent(Integer borrowingLimitPercent) { this.borrowingLimitPercent = borrowingLimitPercent; } public V1LimitedPriorityLevelConfiguration lendablePercent(Integer lendablePercent) { - this.lendablePercent = lendablePercent; return this; } @@ -107,14 +104,12 @@ public Integer getLendablePercent() { return lendablePercent; } - public void setLendablePercent(Integer lendablePercent) { this.lendablePercent = lendablePercent; } public V1LimitedPriorityLevelConfiguration limitResponse(V1LimitResponse limitResponse) { - this.limitResponse = limitResponse; return this; } @@ -128,14 +123,12 @@ public V1LimitResponse getLimitResponse() { return limitResponse; } - public void setLimitResponse(V1LimitResponse limitResponse) { this.limitResponse = limitResponse; } public V1LimitedPriorityLevelConfiguration nominalConcurrencyShares(Integer nominalConcurrencyShares) { - this.nominalConcurrencyShares = nominalConcurrencyShares; return this; } @@ -149,7 +142,6 @@ public Integer getNominalConcurrencyShares() { return nominalConcurrencyShares; } - public void setNominalConcurrencyShares(Integer nominalConcurrencyShares) { this.nominalConcurrencyShares = nominalConcurrencyShares; } @@ -216,28 +208,29 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1LimitedPriorityLevelConfiguration + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1LimitedPriorityLevelConfiguration */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1LimitedPriorityLevelConfiguration.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1LimitedPriorityLevelConfiguration.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1LimitedPriorityLevelConfiguration is not found in the empty JSON string", V1LimitedPriorityLevelConfiguration.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1LimitedPriorityLevelConfiguration.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1LimitedPriorityLevelConfiguration` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1LimitedPriorityLevelConfiguration` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `limitResponse` if (jsonObj.get("limitResponse") != null && !jsonObj.get("limitResponse").isJsonNull()) { - V1LimitResponse.validateJsonObject(jsonObj.getAsJsonObject("limitResponse")); + V1LimitResponse.validateJsonElement(jsonObj.get("limitResponse")); } } @@ -261,9 +254,9 @@ public void write(JsonWriter out, V1LimitedPriorityLevelConfiguration value) thr @Override public V1LimitedPriorityLevelConfiguration read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -290,3 +283,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ListMeta.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ListMeta.java index f199222c1c..a63f3d22cd 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ListMeta.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ListMeta.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ListMeta { public static final String SERIALIZED_NAME_CONTINUE = "continue"; @SerializedName(SERIALIZED_NAME_CONTINUE) @@ -71,7 +71,6 @@ public V1ListMeta() { } public V1ListMeta _continue(String _continue) { - this._continue = _continue; return this; } @@ -85,14 +84,12 @@ public String getContinue() { return _continue; } - public void setContinue(String _continue) { this._continue = _continue; } public V1ListMeta remainingItemCount(Long remainingItemCount) { - this.remainingItemCount = remainingItemCount; return this; } @@ -106,14 +103,12 @@ public Long getRemainingItemCount() { return remainingItemCount; } - public void setRemainingItemCount(Long remainingItemCount) { this.remainingItemCount = remainingItemCount; } public V1ListMeta resourceVersion(String resourceVersion) { - this.resourceVersion = resourceVersion; return this; } @@ -127,14 +122,12 @@ public String getResourceVersion() { return resourceVersion; } - public void setResourceVersion(String resourceVersion) { this.resourceVersion = resourceVersion; } public V1ListMeta selfLink(String selfLink) { - this.selfLink = selfLink; return this; } @@ -148,7 +141,6 @@ public String getSelfLink() { return selfLink; } - public void setSelfLink(String selfLink) { this.selfLink = selfLink; } @@ -215,25 +207,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ListMeta + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ListMeta */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ListMeta.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ListMeta.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ListMeta is not found in the empty JSON string", V1ListMeta.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ListMeta.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ListMeta` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ListMeta` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("continue") != null && !jsonObj.get("continue").isJsonNull()) && !jsonObj.get("continue").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `continue` to be a primitive type in the JSON string but got `%s`", jsonObj.get("continue").toString())); } @@ -265,11 +258,9 @@ public void write(JsonWriter out, V1ListMeta value) throws IOException { @Override public V1ListMeta read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - - // Disable validation so delete API can tolerate non-status return object (graceful deletion) - // validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -296,3 +287,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1LoadBalancerIngress.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1LoadBalancerIngress.java index f5f94935c2..f927935a8d 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1LoadBalancerIngress.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1LoadBalancerIngress.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1PortStatus; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * LoadBalancerIngress represents the status of a load-balancer ingress point: traffic intended for the service should be sent to an ingress point. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1LoadBalancerIngress { public static final String SERIALIZED_NAME_HOSTNAME = "hostname"; @SerializedName(SERIALIZED_NAME_HOSTNAME) @@ -68,13 +68,12 @@ public class V1LoadBalancerIngress { public static final String SERIALIZED_NAME_PORTS = "ports"; @SerializedName(SERIALIZED_NAME_PORTS) - private List ports; + private List ports = new ArrayList<>(); public V1LoadBalancerIngress() { } public V1LoadBalancerIngress hostname(String hostname) { - this.hostname = hostname; return this; } @@ -88,14 +87,12 @@ public String getHostname() { return hostname; } - public void setHostname(String hostname) { this.hostname = hostname; } public V1LoadBalancerIngress ip(String ip) { - this.ip = ip; return this; } @@ -109,14 +106,12 @@ public String getIp() { return ip; } - public void setIp(String ip) { this.ip = ip; } public V1LoadBalancerIngress ipMode(String ipMode) { - this.ipMode = ipMode; return this; } @@ -130,14 +125,12 @@ public String getIpMode() { return ipMode; } - public void setIpMode(String ipMode) { this.ipMode = ipMode; } public V1LoadBalancerIngress ports(List ports) { - this.ports = ports; return this; } @@ -159,7 +152,6 @@ public List getPorts() { return ports; } - public void setPorts(List ports) { this.ports = ports; } @@ -226,25 +218,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1LoadBalancerIngress + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1LoadBalancerIngress */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1LoadBalancerIngress.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1LoadBalancerIngress.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1LoadBalancerIngress is not found in the empty JSON string", V1LoadBalancerIngress.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1LoadBalancerIngress.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1LoadBalancerIngress` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1LoadBalancerIngress` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("hostname") != null && !jsonObj.get("hostname").isJsonNull()) && !jsonObj.get("hostname").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `hostname` to be a primitive type in the JSON string but got `%s`", jsonObj.get("hostname").toString())); } @@ -264,7 +257,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `ports` (array) for (int i = 0; i < jsonArrayports.size(); i++) { - V1PortStatus.validateJsonObject(jsonArrayports.get(i).getAsJsonObject()); + V1PortStatus.validateJsonElement(jsonArrayports.get(i)); }; } } @@ -290,9 +283,9 @@ public void write(JsonWriter out, V1LoadBalancerIngress value) throws IOExceptio @Override public V1LoadBalancerIngress read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -319,3 +312,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1LoadBalancerStatus.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1LoadBalancerStatus.java index 952608fdf0..bf990a9b54 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1LoadBalancerStatus.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1LoadBalancerStatus.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1LoadBalancerIngress; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,17 +52,16 @@ /** * LoadBalancerStatus represents the status of a load-balancer. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1LoadBalancerStatus { public static final String SERIALIZED_NAME_INGRESS = "ingress"; @SerializedName(SERIALIZED_NAME_INGRESS) - private List ingress; + private List ingress = new ArrayList<>(); public V1LoadBalancerStatus() { } public V1LoadBalancerStatus ingress(List ingress) { - this.ingress = ingress; return this; } @@ -84,7 +83,6 @@ public List getIngress() { return ingress; } - public void setIngress(List ingress) { this.ingress = ingress; } @@ -142,25 +140,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1LoadBalancerStatus + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1LoadBalancerStatus */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1LoadBalancerStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1LoadBalancerStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1LoadBalancerStatus is not found in the empty JSON string", V1LoadBalancerStatus.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1LoadBalancerStatus.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1LoadBalancerStatus` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1LoadBalancerStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (jsonObj.get("ingress") != null && !jsonObj.get("ingress").isJsonNull()) { JsonArray jsonArrayingress = jsonObj.getAsJsonArray("ingress"); if (jsonArrayingress != null) { @@ -171,7 +170,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `ingress` (array) for (int i = 0; i < jsonArrayingress.size(); i++) { - V1LoadBalancerIngress.validateJsonObject(jsonArrayingress.get(i).getAsJsonObject()); + V1LoadBalancerIngress.validateJsonElement(jsonArrayingress.get(i)); }; } } @@ -197,9 +196,9 @@ public void write(JsonWriter out, V1LoadBalancerStatus value) throws IOException @Override public V1LoadBalancerStatus read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -226,3 +225,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1LocalObjectReference.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1LocalObjectReference.java index 865eac7d04..4a42b7f966 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1LocalObjectReference.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1LocalObjectReference.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1LocalObjectReference { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) @@ -59,13 +59,12 @@ public V1LocalObjectReference() { } public V1LocalObjectReference name(String name) { - this.name = name; return this; } /** - * Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + * Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names * @return name **/ @jakarta.annotation.Nullable @@ -73,7 +72,6 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } @@ -131,25 +129,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1LocalObjectReference + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1LocalObjectReference */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1LocalObjectReference.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1LocalObjectReference.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1LocalObjectReference is not found in the empty JSON string", V1LocalObjectReference.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1LocalObjectReference.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1LocalObjectReference` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1LocalObjectReference` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } @@ -175,9 +174,9 @@ public void write(JsonWriter out, V1LocalObjectReference value) throws IOExcepti @Override public V1LocalObjectReference read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -204,3 +203,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1LocalSubjectAccessReview.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1LocalSubjectAccessReview.java index 9a4f5f7f00..3521044660 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1LocalSubjectAccessReview.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1LocalSubjectAccessReview.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1SubjectAccessReviewSpec; import io.kubernetes.client.openapi.models.V1SubjectAccessReviewStatus; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * 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. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1LocalSubjectAccessReview implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -78,7 +78,6 @@ public V1LocalSubjectAccessReview() { } public V1LocalSubjectAccessReview apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -92,14 +91,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1LocalSubjectAccessReview kind(String kind) { - this.kind = kind; return this; } @@ -113,14 +110,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1LocalSubjectAccessReview metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -134,14 +129,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V1LocalSubjectAccessReview spec(V1SubjectAccessReviewSpec spec) { - this.spec = spec; return this; } @@ -155,14 +148,12 @@ public V1SubjectAccessReviewSpec getSpec() { return spec; } - public void setSpec(V1SubjectAccessReviewSpec spec) { this.spec = spec; } public V1LocalSubjectAccessReview status(V1SubjectAccessReviewStatus status) { - this.status = status; return this; } @@ -176,7 +167,6 @@ public V1SubjectAccessReviewStatus getStatus() { return status; } - public void setStatus(V1SubjectAccessReviewStatus status) { this.status = status; } @@ -247,32 +237,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1LocalSubjectAccessReview + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1LocalSubjectAccessReview */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1LocalSubjectAccessReview.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1LocalSubjectAccessReview.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1LocalSubjectAccessReview is not found in the empty JSON string", V1LocalSubjectAccessReview.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1LocalSubjectAccessReview.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1LocalSubjectAccessReview` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1LocalSubjectAccessReview` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1LocalSubjectAccessReview.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -281,13 +272,13 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } // validate the required field `spec` - V1SubjectAccessReviewSpec.validateJsonObject(jsonObj.getAsJsonObject("spec")); + V1SubjectAccessReviewSpec.validateJsonElement(jsonObj.get("spec")); // validate the optional field `status` if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { - V1SubjectAccessReviewStatus.validateJsonObject(jsonObj.getAsJsonObject("status")); + V1SubjectAccessReviewStatus.validateJsonElement(jsonObj.get("status")); } } @@ -311,9 +302,9 @@ public void write(JsonWriter out, V1LocalSubjectAccessReview value) throws IOExc @Override public V1LocalSubjectAccessReview read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -340,3 +331,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1LocalVolumeSource.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1LocalVolumeSource.java index c4e3928fcd..1b21dec8d1 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1LocalVolumeSource.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1LocalVolumeSource.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * Local represents directly-attached storage with node affinity (Beta feature) */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1LocalVolumeSource { public static final String SERIALIZED_NAME_FS_TYPE = "fsType"; @SerializedName(SERIALIZED_NAME_FS_TYPE) @@ -63,7 +63,6 @@ public V1LocalVolumeSource() { } public V1LocalVolumeSource fsType(String fsType) { - this.fsType = fsType; return this; } @@ -77,14 +76,12 @@ public String getFsType() { return fsType; } - public void setFsType(String fsType) { this.fsType = fsType; } public V1LocalVolumeSource path(String path) { - this.path = path; return this; } @@ -98,7 +95,6 @@ public String getPath() { return path; } - public void setPath(String path) { this.path = path; } @@ -160,32 +156,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1LocalVolumeSource + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1LocalVolumeSource */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1LocalVolumeSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1LocalVolumeSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1LocalVolumeSource is not found in the empty JSON string", V1LocalVolumeSource.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1LocalVolumeSource.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1LocalVolumeSource` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1LocalVolumeSource` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1LocalVolumeSource.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("fsType") != null && !jsonObj.get("fsType").isJsonNull()) && !jsonObj.get("fsType").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `fsType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fsType").toString())); } @@ -214,9 +211,9 @@ public void write(JsonWriter out, V1LocalVolumeSource value) throws IOException @Override public V1LocalVolumeSource read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -243,3 +240,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ManagedFieldsEntry.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ManagedFieldsEntry.java index a904c98de1..6025aabfda 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ManagedFieldsEntry.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ManagedFieldsEntry.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * ManagedFieldsEntry is a workflow-id, a FieldSet and the group version of the resource that the fieldset applies to. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ManagedFieldsEntry { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -84,7 +84,6 @@ public V1ManagedFieldsEntry() { } public V1ManagedFieldsEntry apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -98,14 +97,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1ManagedFieldsEntry fieldsType(String fieldsType) { - this.fieldsType = fieldsType; return this; } @@ -119,14 +116,12 @@ public String getFieldsType() { return fieldsType; } - public void setFieldsType(String fieldsType) { this.fieldsType = fieldsType; } public V1ManagedFieldsEntry fieldsV1(Object fieldsV1) { - this.fieldsV1 = fieldsV1; return this; } @@ -140,14 +135,12 @@ public Object getFieldsV1() { return fieldsV1; } - public void setFieldsV1(Object fieldsV1) { this.fieldsV1 = fieldsV1; } public V1ManagedFieldsEntry manager(String manager) { - this.manager = manager; return this; } @@ -161,14 +154,12 @@ public String getManager() { return manager; } - public void setManager(String manager) { this.manager = manager; } public V1ManagedFieldsEntry operation(String operation) { - this.operation = operation; return this; } @@ -182,14 +173,12 @@ public String getOperation() { return operation; } - public void setOperation(String operation) { this.operation = operation; } public V1ManagedFieldsEntry subresource(String subresource) { - this.subresource = subresource; return this; } @@ -203,14 +192,12 @@ public String getSubresource() { return subresource; } - public void setSubresource(String subresource) { this.subresource = subresource; } public V1ManagedFieldsEntry time(OffsetDateTime time) { - this.time = time; return this; } @@ -224,7 +211,6 @@ public OffsetDateTime getTime() { return time; } - public void setTime(OffsetDateTime time) { this.time = time; } @@ -300,25 +286,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ManagedFieldsEntry + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ManagedFieldsEntry */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ManagedFieldsEntry.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ManagedFieldsEntry.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ManagedFieldsEntry is not found in the empty JSON string", V1ManagedFieldsEntry.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ManagedFieldsEntry.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ManagedFieldsEntry` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ManagedFieldsEntry` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -356,9 +343,9 @@ public void write(JsonWriter out, V1ManagedFieldsEntry value) throws IOException @Override public V1ManagedFieldsEntry read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -385,3 +372,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1MatchCondition.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1MatchCondition.java index 396e17a50a..cb56e6f49e 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1MatchCondition.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1MatchCondition.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * MatchCondition represents a condition which must by fulfilled for a request to be sent to a webhook. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1MatchCondition { public static final String SERIALIZED_NAME_EXPRESSION = "expression"; @SerializedName(SERIALIZED_NAME_EXPRESSION) @@ -63,7 +63,6 @@ public V1MatchCondition() { } public V1MatchCondition expression(String expression) { - this.expression = expression; return this; } @@ -77,14 +76,12 @@ public String getExpression() { return expression; } - public void setExpression(String expression) { this.expression = expression; } public V1MatchCondition name(String name) { - this.name = name; return this; } @@ -98,7 +95,6 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } @@ -161,32 +157,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1MatchCondition + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1MatchCondition */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1MatchCondition.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1MatchCondition.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1MatchCondition is not found in the empty JSON string", V1MatchCondition.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1MatchCondition.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1MatchCondition` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1MatchCondition` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1MatchCondition.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("expression").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `expression` to be a primitive type in the JSON string but got `%s`", jsonObj.get("expression").toString())); } @@ -215,9 +212,9 @@ public void write(JsonWriter out, V1MatchCondition value) throws IOException { @Override public V1MatchCondition read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -244,3 +241,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1MatchResources.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1MatchResources.java index daf8f720da..94e5342812 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1MatchResources.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1MatchResources.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1NamedRuleWithOperations; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,11 +53,11 @@ /** * MatchResources decides whether to run the admission control policy on an object based on whether it meets the match criteria. The exclude rules take precedence over include rules (if a resource matches both, it is excluded) */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1MatchResources { public static final String SERIALIZED_NAME_EXCLUDE_RESOURCE_RULES = "excludeResourceRules"; @SerializedName(SERIALIZED_NAME_EXCLUDE_RESOURCE_RULES) - private List excludeResourceRules; + private List excludeResourceRules = new ArrayList<>(); public static final String SERIALIZED_NAME_MATCH_POLICY = "matchPolicy"; @SerializedName(SERIALIZED_NAME_MATCH_POLICY) @@ -73,13 +73,12 @@ public class V1MatchResources { public static final String SERIALIZED_NAME_RESOURCE_RULES = "resourceRules"; @SerializedName(SERIALIZED_NAME_RESOURCE_RULES) - private List resourceRules; + private List resourceRules = new ArrayList<>(); public V1MatchResources() { } public V1MatchResources excludeResourceRules(List excludeResourceRules) { - this.excludeResourceRules = excludeResourceRules; return this; } @@ -101,14 +100,12 @@ public List getExcludeResourceRules() { return excludeResourceRules; } - public void setExcludeResourceRules(List excludeResourceRules) { this.excludeResourceRules = excludeResourceRules; } public V1MatchResources matchPolicy(String matchPolicy) { - this.matchPolicy = matchPolicy; return this; } @@ -122,14 +119,12 @@ public String getMatchPolicy() { return matchPolicy; } - public void setMatchPolicy(String matchPolicy) { this.matchPolicy = matchPolicy; } public V1MatchResources namespaceSelector(V1LabelSelector namespaceSelector) { - this.namespaceSelector = namespaceSelector; return this; } @@ -143,14 +138,12 @@ public V1LabelSelector getNamespaceSelector() { return namespaceSelector; } - public void setNamespaceSelector(V1LabelSelector namespaceSelector) { this.namespaceSelector = namespaceSelector; } public V1MatchResources objectSelector(V1LabelSelector objectSelector) { - this.objectSelector = objectSelector; return this; } @@ -164,14 +157,12 @@ public V1LabelSelector getObjectSelector() { return objectSelector; } - public void setObjectSelector(V1LabelSelector objectSelector) { this.objectSelector = objectSelector; } public V1MatchResources resourceRules(List resourceRules) { - this.resourceRules = resourceRules; return this; } @@ -193,7 +184,6 @@ public List getResourceRules() { return resourceRules; } - public void setResourceRules(List resourceRules) { this.resourceRules = resourceRules; } @@ -263,25 +253,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1MatchResources + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1MatchResources */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1MatchResources.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1MatchResources.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1MatchResources is not found in the empty JSON string", V1MatchResources.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1MatchResources.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1MatchResources` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1MatchResources` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (jsonObj.get("excludeResourceRules") != null && !jsonObj.get("excludeResourceRules").isJsonNull()) { JsonArray jsonArrayexcludeResourceRules = jsonObj.getAsJsonArray("excludeResourceRules"); if (jsonArrayexcludeResourceRules != null) { @@ -292,7 +283,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `excludeResourceRules` (array) for (int i = 0; i < jsonArrayexcludeResourceRules.size(); i++) { - V1NamedRuleWithOperations.validateJsonObject(jsonArrayexcludeResourceRules.get(i).getAsJsonObject()); + V1NamedRuleWithOperations.validateJsonElement(jsonArrayexcludeResourceRules.get(i)); }; } } @@ -301,11 +292,11 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `namespaceSelector` if (jsonObj.get("namespaceSelector") != null && !jsonObj.get("namespaceSelector").isJsonNull()) { - V1LabelSelector.validateJsonObject(jsonObj.getAsJsonObject("namespaceSelector")); + V1LabelSelector.validateJsonElement(jsonObj.get("namespaceSelector")); } // validate the optional field `objectSelector` if (jsonObj.get("objectSelector") != null && !jsonObj.get("objectSelector").isJsonNull()) { - V1LabelSelector.validateJsonObject(jsonObj.getAsJsonObject("objectSelector")); + V1LabelSelector.validateJsonElement(jsonObj.get("objectSelector")); } if (jsonObj.get("resourceRules") != null && !jsonObj.get("resourceRules").isJsonNull()) { JsonArray jsonArrayresourceRules = jsonObj.getAsJsonArray("resourceRules"); @@ -317,7 +308,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `resourceRules` (array) for (int i = 0; i < jsonArrayresourceRules.size(); i++) { - V1NamedRuleWithOperations.validateJsonObject(jsonArrayresourceRules.get(i).getAsJsonObject()); + V1NamedRuleWithOperations.validateJsonElement(jsonArrayresourceRules.get(i)); }; } } @@ -343,9 +334,9 @@ public void write(JsonWriter out, V1MatchResources value) throws IOException { @Override public V1MatchResources read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -372,3 +363,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ModifyVolumeStatus.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ModifyVolumeStatus.java index cce9e7d199..b70f1d10dd 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ModifyVolumeStatus.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ModifyVolumeStatus.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * ModifyVolumeStatus represents the status object of ControllerModifyVolume operation */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ModifyVolumeStatus { public static final String SERIALIZED_NAME_STATUS = "status"; @SerializedName(SERIALIZED_NAME_STATUS) @@ -63,7 +63,6 @@ public V1ModifyVolumeStatus() { } public V1ModifyVolumeStatus status(String status) { - this.status = status; return this; } @@ -77,14 +76,12 @@ public String getStatus() { return status; } - public void setStatus(String status) { this.status = status; } public V1ModifyVolumeStatus targetVolumeAttributesClassName(String targetVolumeAttributesClassName) { - this.targetVolumeAttributesClassName = targetVolumeAttributesClassName; return this; } @@ -98,7 +95,6 @@ public String getTargetVolumeAttributesClassName() { return targetVolumeAttributesClassName; } - public void setTargetVolumeAttributesClassName(String targetVolumeAttributesClassName) { this.targetVolumeAttributesClassName = targetVolumeAttributesClassName; } @@ -160,32 +156,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ModifyVolumeStatus + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ModifyVolumeStatus */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ModifyVolumeStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ModifyVolumeStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ModifyVolumeStatus is not found in the empty JSON string", V1ModifyVolumeStatus.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ModifyVolumeStatus.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ModifyVolumeStatus` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ModifyVolumeStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1ModifyVolumeStatus.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("status").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); } @@ -214,9 +211,9 @@ public void write(JsonWriter out, V1ModifyVolumeStatus value) throws IOException @Override public V1ModifyVolumeStatus read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -243,3 +240,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1MutatingWebhook.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1MutatingWebhook.java index 66b147e84f..2f66cd15e4 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1MutatingWebhook.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1MutatingWebhook.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -25,6 +25,7 @@ import io.kubernetes.client.openapi.models.V1RuleWithOperations; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -47,7 +48,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -55,7 +55,7 @@ /** * MutatingWebhook describes an admission webhook and the resources and operations it applies to. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1MutatingWebhook { public static final String SERIALIZED_NAME_ADMISSION_REVIEW_VERSIONS = "admissionReviewVersions"; @SerializedName(SERIALIZED_NAME_ADMISSION_REVIEW_VERSIONS) @@ -71,7 +71,7 @@ public class V1MutatingWebhook { public static final String SERIALIZED_NAME_MATCH_CONDITIONS = "matchConditions"; @SerializedName(SERIALIZED_NAME_MATCH_CONDITIONS) - private List matchConditions; + private List matchConditions = new ArrayList<>(); public static final String SERIALIZED_NAME_MATCH_POLICY = "matchPolicy"; @SerializedName(SERIALIZED_NAME_MATCH_POLICY) @@ -95,7 +95,7 @@ public class V1MutatingWebhook { public static final String SERIALIZED_NAME_RULES = "rules"; @SerializedName(SERIALIZED_NAME_RULES) - private List rules; + private List rules = new ArrayList<>(); public static final String SERIALIZED_NAME_SIDE_EFFECTS = "sideEffects"; @SerializedName(SERIALIZED_NAME_SIDE_EFFECTS) @@ -109,7 +109,6 @@ public V1MutatingWebhook() { } public V1MutatingWebhook admissionReviewVersions(List admissionReviewVersions) { - this.admissionReviewVersions = admissionReviewVersions; return this; } @@ -131,14 +130,12 @@ public List getAdmissionReviewVersions() { return admissionReviewVersions; } - public void setAdmissionReviewVersions(List admissionReviewVersions) { this.admissionReviewVersions = admissionReviewVersions; } public V1MutatingWebhook clientConfig(AdmissionregistrationV1WebhookClientConfig clientConfig) { - this.clientConfig = clientConfig; return this; } @@ -152,14 +149,12 @@ public AdmissionregistrationV1WebhookClientConfig getClientConfig() { return clientConfig; } - public void setClientConfig(AdmissionregistrationV1WebhookClientConfig clientConfig) { this.clientConfig = clientConfig; } public V1MutatingWebhook failurePolicy(String failurePolicy) { - this.failurePolicy = failurePolicy; return this; } @@ -173,14 +168,12 @@ public String getFailurePolicy() { return failurePolicy; } - public void setFailurePolicy(String failurePolicy) { this.failurePolicy = failurePolicy; } public V1MutatingWebhook matchConditions(List matchConditions) { - this.matchConditions = matchConditions; return this; } @@ -202,14 +195,12 @@ public List getMatchConditions() { return matchConditions; } - public void setMatchConditions(List matchConditions) { this.matchConditions = matchConditions; } public V1MutatingWebhook matchPolicy(String matchPolicy) { - this.matchPolicy = matchPolicy; return this; } @@ -223,14 +214,12 @@ public String getMatchPolicy() { return matchPolicy; } - public void setMatchPolicy(String matchPolicy) { this.matchPolicy = matchPolicy; } public V1MutatingWebhook name(String name) { - this.name = name; return this; } @@ -244,14 +233,12 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } public V1MutatingWebhook namespaceSelector(V1LabelSelector namespaceSelector) { - this.namespaceSelector = namespaceSelector; return this; } @@ -265,14 +252,12 @@ public V1LabelSelector getNamespaceSelector() { return namespaceSelector; } - public void setNamespaceSelector(V1LabelSelector namespaceSelector) { this.namespaceSelector = namespaceSelector; } public V1MutatingWebhook objectSelector(V1LabelSelector objectSelector) { - this.objectSelector = objectSelector; return this; } @@ -286,14 +271,12 @@ public V1LabelSelector getObjectSelector() { return objectSelector; } - public void setObjectSelector(V1LabelSelector objectSelector) { this.objectSelector = objectSelector; } public V1MutatingWebhook reinvocationPolicy(String reinvocationPolicy) { - this.reinvocationPolicy = reinvocationPolicy; return this; } @@ -307,14 +290,12 @@ public String getReinvocationPolicy() { return reinvocationPolicy; } - public void setReinvocationPolicy(String reinvocationPolicy) { this.reinvocationPolicy = reinvocationPolicy; } public V1MutatingWebhook rules(List rules) { - this.rules = rules; return this; } @@ -336,14 +317,12 @@ public List getRules() { return rules; } - public void setRules(List rules) { this.rules = rules; } public V1MutatingWebhook sideEffects(String sideEffects) { - this.sideEffects = sideEffects; return this; } @@ -357,14 +336,12 @@ public String getSideEffects() { return sideEffects; } - public void setSideEffects(String sideEffects) { this.sideEffects = sideEffects; } public V1MutatingWebhook timeoutSeconds(Integer timeoutSeconds) { - this.timeoutSeconds = timeoutSeconds; return this; } @@ -378,7 +355,6 @@ public Integer getTimeoutSeconds() { return timeoutSeconds; } - public void setTimeoutSeconds(Integer timeoutSeconds) { this.timeoutSeconds = timeoutSeconds; } @@ -473,32 +449,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1MutatingWebhook + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1MutatingWebhook */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1MutatingWebhook.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1MutatingWebhook.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1MutatingWebhook is not found in the empty JSON string", V1MutatingWebhook.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1MutatingWebhook.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1MutatingWebhook` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1MutatingWebhook` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1MutatingWebhook.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the required json array is present if (jsonObj.get("admissionReviewVersions") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); @@ -506,7 +483,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("Expected the field `admissionReviewVersions` to be an array in the JSON string but got `%s`", jsonObj.get("admissionReviewVersions").toString())); } // validate the required field `clientConfig` - AdmissionregistrationV1WebhookClientConfig.validateJsonObject(jsonObj.getAsJsonObject("clientConfig")); + AdmissionregistrationV1WebhookClientConfig.validateJsonElement(jsonObj.get("clientConfig")); if ((jsonObj.get("failurePolicy") != null && !jsonObj.get("failurePolicy").isJsonNull()) && !jsonObj.get("failurePolicy").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `failurePolicy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("failurePolicy").toString())); } @@ -520,7 +497,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `matchConditions` (array) for (int i = 0; i < jsonArraymatchConditions.size(); i++) { - V1MatchCondition.validateJsonObject(jsonArraymatchConditions.get(i).getAsJsonObject()); + V1MatchCondition.validateJsonElement(jsonArraymatchConditions.get(i)); }; } } @@ -532,11 +509,11 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `namespaceSelector` if (jsonObj.get("namespaceSelector") != null && !jsonObj.get("namespaceSelector").isJsonNull()) { - V1LabelSelector.validateJsonObject(jsonObj.getAsJsonObject("namespaceSelector")); + V1LabelSelector.validateJsonElement(jsonObj.get("namespaceSelector")); } // validate the optional field `objectSelector` if (jsonObj.get("objectSelector") != null && !jsonObj.get("objectSelector").isJsonNull()) { - V1LabelSelector.validateJsonObject(jsonObj.getAsJsonObject("objectSelector")); + V1LabelSelector.validateJsonElement(jsonObj.get("objectSelector")); } if ((jsonObj.get("reinvocationPolicy") != null && !jsonObj.get("reinvocationPolicy").isJsonNull()) && !jsonObj.get("reinvocationPolicy").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `reinvocationPolicy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reinvocationPolicy").toString())); @@ -551,7 +528,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `rules` (array) for (int i = 0; i < jsonArrayrules.size(); i++) { - V1RuleWithOperations.validateJsonObject(jsonArrayrules.get(i).getAsJsonObject()); + V1RuleWithOperations.validateJsonElement(jsonArrayrules.get(i)); }; } } @@ -580,9 +557,9 @@ public void write(JsonWriter out, V1MutatingWebhook value) throws IOException { @Override public V1MutatingWebhook read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -609,3 +586,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1MutatingWebhookConfiguration.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1MutatingWebhookConfiguration.java index 4c242463dd..617a4e7ef6 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1MutatingWebhookConfiguration.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1MutatingWebhookConfiguration.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1ObjectMeta; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * MutatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and may change the object. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1MutatingWebhookConfiguration implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -69,13 +69,12 @@ public class V1MutatingWebhookConfiguration implements io.kubernetes.client.comm public static final String SERIALIZED_NAME_WEBHOOKS = "webhooks"; @SerializedName(SERIALIZED_NAME_WEBHOOKS) - private List webhooks; + private List webhooks = new ArrayList<>(); public V1MutatingWebhookConfiguration() { } public V1MutatingWebhookConfiguration apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -89,14 +88,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1MutatingWebhookConfiguration kind(String kind) { - this.kind = kind; return this; } @@ -110,14 +107,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1MutatingWebhookConfiguration metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -131,14 +126,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V1MutatingWebhookConfiguration webhooks(List webhooks) { - this.webhooks = webhooks; return this; } @@ -160,7 +153,6 @@ public List getWebhooks() { return webhooks; } - public void setWebhooks(List webhooks) { this.webhooks = webhooks; } @@ -227,25 +219,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1MutatingWebhookConfiguration + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1MutatingWebhookConfiguration */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1MutatingWebhookConfiguration.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1MutatingWebhookConfiguration.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1MutatingWebhookConfiguration is not found in the empty JSON string", V1MutatingWebhookConfiguration.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1MutatingWebhookConfiguration.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1MutatingWebhookConfiguration` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1MutatingWebhookConfiguration` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -254,7 +247,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } if (jsonObj.get("webhooks") != null && !jsonObj.get("webhooks").isJsonNull()) { JsonArray jsonArraywebhooks = jsonObj.getAsJsonArray("webhooks"); @@ -266,7 +259,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `webhooks` (array) for (int i = 0; i < jsonArraywebhooks.size(); i++) { - V1MutatingWebhook.validateJsonObject(jsonArraywebhooks.get(i).getAsJsonObject()); + V1MutatingWebhook.validateJsonElement(jsonArraywebhooks.get(i)); }; } } @@ -292,9 +285,9 @@ public void write(JsonWriter out, V1MutatingWebhookConfiguration value) throws I @Override public V1MutatingWebhookConfiguration read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -321,3 +314,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1MutatingWebhookConfigurationList.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1MutatingWebhookConfigurationList.java index e3e9d92203..451c8069ce 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1MutatingWebhookConfigurationList.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1MutatingWebhookConfigurationList.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1MutatingWebhookConfiguration; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * MutatingWebhookConfigurationList is a list of MutatingWebhookConfiguration. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1MutatingWebhookConfigurationList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -75,7 +75,6 @@ public V1MutatingWebhookConfigurationList() { } public V1MutatingWebhookConfigurationList apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -89,14 +88,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1MutatingWebhookConfigurationList items(List items) { - this.items = items; return this; } @@ -118,14 +115,12 @@ public List getItems() { return items; } - public void setItems(List items) { this.items = items; } public V1MutatingWebhookConfigurationList kind(String kind) { - this.kind = kind; return this; } @@ -139,14 +134,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1MutatingWebhookConfigurationList metadata(V1ListMeta metadata) { - this.metadata = metadata; return this; } @@ -160,7 +153,6 @@ public V1ListMeta getMetadata() { return metadata; } - public void setMetadata(V1ListMeta metadata) { this.metadata = metadata; } @@ -228,32 +220,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1MutatingWebhookConfigurationList + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1MutatingWebhookConfigurationList */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1MutatingWebhookConfigurationList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1MutatingWebhookConfigurationList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1MutatingWebhookConfigurationList is not found in the empty JSON string", V1MutatingWebhookConfigurationList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1MutatingWebhookConfigurationList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1MutatingWebhookConfigurationList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1MutatingWebhookConfigurationList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1MutatingWebhookConfigurationList.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -265,14 +258,14 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); // validate the required field `items` (array) for (int i = 0; i < jsonArrayitems.size(); i++) { - V1MutatingWebhookConfiguration.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject()); + V1MutatingWebhookConfiguration.validateJsonElement(jsonArrayitems.get(i)); }; if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ListMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ListMeta.validateJsonElement(jsonObj.get("metadata")); } } @@ -296,9 +289,9 @@ public void write(JsonWriter out, V1MutatingWebhookConfigurationList value) thro @Override public V1MutatingWebhookConfigurationList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -325,3 +318,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NFSVolumeSource.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NFSVolumeSource.java index 3cdeb01e74..a4b8eab85b 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NFSVolumeSource.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NFSVolumeSource.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * Represents an NFS mount that lasts the lifetime of a pod. NFS volumes do not support ownership management or SELinux relabeling. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1NFSVolumeSource { public static final String SERIALIZED_NAME_PATH = "path"; @SerializedName(SERIALIZED_NAME_PATH) @@ -67,7 +67,6 @@ public V1NFSVolumeSource() { } public V1NFSVolumeSource path(String path) { - this.path = path; return this; } @@ -81,14 +80,12 @@ public String getPath() { return path; } - public void setPath(String path) { this.path = path; } public V1NFSVolumeSource readOnly(Boolean readOnly) { - this.readOnly = readOnly; return this; } @@ -102,14 +99,12 @@ public Boolean getReadOnly() { return readOnly; } - public void setReadOnly(Boolean readOnly) { this.readOnly = readOnly; } public V1NFSVolumeSource server(String server) { - this.server = server; return this; } @@ -123,7 +118,6 @@ public String getServer() { return server; } - public void setServer(String server) { this.server = server; } @@ -189,32 +183,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1NFSVolumeSource + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1NFSVolumeSource */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1NFSVolumeSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1NFSVolumeSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1NFSVolumeSource is not found in the empty JSON string", V1NFSVolumeSource.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1NFSVolumeSource.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1NFSVolumeSource` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1NFSVolumeSource` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1NFSVolumeSource.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("path").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `path` to be a primitive type in the JSON string but got `%s`", jsonObj.get("path").toString())); } @@ -243,9 +238,9 @@ public void write(JsonWriter out, V1NFSVolumeSource value) throws IOException { @Override public V1NFSVolumeSource read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -272,3 +267,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NamedRuleWithOperations.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NamedRuleWithOperations.java index 7db1eda3ba..bd4431974f 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NamedRuleWithOperations.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NamedRuleWithOperations.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -43,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -51,27 +51,27 @@ /** * NamedRuleWithOperations is a tuple of Operations and Resources with ResourceNames. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1NamedRuleWithOperations { public static final String SERIALIZED_NAME_API_GROUPS = "apiGroups"; @SerializedName(SERIALIZED_NAME_API_GROUPS) - private List apiGroups; + private List apiGroups = new ArrayList<>(); public static final String SERIALIZED_NAME_API_VERSIONS = "apiVersions"; @SerializedName(SERIALIZED_NAME_API_VERSIONS) - private List apiVersions; + private List apiVersions = new ArrayList<>(); public static final String SERIALIZED_NAME_OPERATIONS = "operations"; @SerializedName(SERIALIZED_NAME_OPERATIONS) - private List operations; + private List operations = new ArrayList<>(); public static final String SERIALIZED_NAME_RESOURCE_NAMES = "resourceNames"; @SerializedName(SERIALIZED_NAME_RESOURCE_NAMES) - private List resourceNames; + private List resourceNames = new ArrayList<>(); public static final String SERIALIZED_NAME_RESOURCES = "resources"; @SerializedName(SERIALIZED_NAME_RESOURCES) - private List resources; + private List resources = new ArrayList<>(); public static final String SERIALIZED_NAME_SCOPE = "scope"; @SerializedName(SERIALIZED_NAME_SCOPE) @@ -81,7 +81,6 @@ public V1NamedRuleWithOperations() { } public V1NamedRuleWithOperations apiGroups(List apiGroups) { - this.apiGroups = apiGroups; return this; } @@ -103,14 +102,12 @@ public List getApiGroups() { return apiGroups; } - public void setApiGroups(List apiGroups) { this.apiGroups = apiGroups; } public V1NamedRuleWithOperations apiVersions(List apiVersions) { - this.apiVersions = apiVersions; return this; } @@ -132,14 +129,12 @@ public List getApiVersions() { return apiVersions; } - public void setApiVersions(List apiVersions) { this.apiVersions = apiVersions; } public V1NamedRuleWithOperations operations(List operations) { - this.operations = operations; return this; } @@ -161,14 +156,12 @@ public List getOperations() { return operations; } - public void setOperations(List operations) { this.operations = operations; } public V1NamedRuleWithOperations resourceNames(List resourceNames) { - this.resourceNames = resourceNames; return this; } @@ -190,14 +183,12 @@ public List getResourceNames() { return resourceNames; } - public void setResourceNames(List resourceNames) { this.resourceNames = resourceNames; } public V1NamedRuleWithOperations resources(List resources) { - this.resources = resources; return this; } @@ -219,14 +210,12 @@ public List getResources() { return resources; } - public void setResources(List resources) { this.resources = resources; } public V1NamedRuleWithOperations scope(String scope) { - this.scope = scope; return this; } @@ -240,7 +229,6 @@ public String getScope() { return scope; } - public void setScope(String scope) { this.scope = scope; } @@ -313,43 +301,44 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1NamedRuleWithOperations + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1NamedRuleWithOperations */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1NamedRuleWithOperations.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1NamedRuleWithOperations.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1NamedRuleWithOperations is not found in the empty JSON string", V1NamedRuleWithOperations.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1NamedRuleWithOperations.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1NamedRuleWithOperations` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1NamedRuleWithOperations` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the optional json data is an array if present - if (jsonObj.get("apiGroups") != null && !jsonObj.get("apiGroups").isJsonArray()) { + if (jsonObj.get("apiGroups") != null && !jsonObj.get("apiGroups").isJsonNull() && !jsonObj.get("apiGroups").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `apiGroups` to be an array in the JSON string but got `%s`", jsonObj.get("apiGroups").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("apiVersions") != null && !jsonObj.get("apiVersions").isJsonArray()) { + if (jsonObj.get("apiVersions") != null && !jsonObj.get("apiVersions").isJsonNull() && !jsonObj.get("apiVersions").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersions` to be an array in the JSON string but got `%s`", jsonObj.get("apiVersions").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("operations") != null && !jsonObj.get("operations").isJsonArray()) { + if (jsonObj.get("operations") != null && !jsonObj.get("operations").isJsonNull() && !jsonObj.get("operations").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `operations` to be an array in the JSON string but got `%s`", jsonObj.get("operations").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("resourceNames") != null && !jsonObj.get("resourceNames").isJsonArray()) { + if (jsonObj.get("resourceNames") != null && !jsonObj.get("resourceNames").isJsonNull() && !jsonObj.get("resourceNames").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `resourceNames` to be an array in the JSON string but got `%s`", jsonObj.get("resourceNames").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("resources") != null && !jsonObj.get("resources").isJsonArray()) { + if (jsonObj.get("resources") != null && !jsonObj.get("resources").isJsonNull() && !jsonObj.get("resources").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `resources` to be an array in the JSON string but got `%s`", jsonObj.get("resources").toString())); } if ((jsonObj.get("scope") != null && !jsonObj.get("scope").isJsonNull()) && !jsonObj.get("scope").isJsonPrimitive()) { @@ -377,9 +366,9 @@ public void write(JsonWriter out, V1NamedRuleWithOperations value) throws IOExce @Override public V1NamedRuleWithOperations read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -406,3 +395,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Namespace.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Namespace.java index 7aa3b42d91..848c4a9f10 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Namespace.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Namespace.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1NamespaceStatus; import io.kubernetes.client.openapi.models.V1ObjectMeta; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * Namespace provides a scope for Names. Use of multiple namespaces is optional. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1Namespace implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -78,7 +78,6 @@ public V1Namespace() { } public V1Namespace apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -92,14 +91,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1Namespace kind(String kind) { - this.kind = kind; return this; } @@ -113,14 +110,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1Namespace metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -134,14 +129,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V1Namespace spec(V1NamespaceSpec spec) { - this.spec = spec; return this; } @@ -155,14 +148,12 @@ public V1NamespaceSpec getSpec() { return spec; } - public void setSpec(V1NamespaceSpec spec) { this.spec = spec; } public V1Namespace status(V1NamespaceStatus status) { - this.status = status; return this; } @@ -176,7 +167,6 @@ public V1NamespaceStatus getStatus() { return status; } - public void setStatus(V1NamespaceStatus status) { this.status = status; } @@ -246,25 +236,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1Namespace + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1Namespace */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1Namespace.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1Namespace.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1Namespace is not found in the empty JSON string", V1Namespace.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1Namespace.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1Namespace` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1Namespace` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -273,15 +264,15 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } // validate the optional field `spec` if (jsonObj.get("spec") != null && !jsonObj.get("spec").isJsonNull()) { - V1NamespaceSpec.validateJsonObject(jsonObj.getAsJsonObject("spec")); + V1NamespaceSpec.validateJsonElement(jsonObj.get("spec")); } // validate the optional field `status` if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { - V1NamespaceStatus.validateJsonObject(jsonObj.getAsJsonObject("status")); + V1NamespaceStatus.validateJsonElement(jsonObj.get("status")); } } @@ -305,9 +296,9 @@ public void write(JsonWriter out, V1Namespace value) throws IOException { @Override public V1Namespace read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -334,3 +325,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NamespaceCondition.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NamespaceCondition.java index 607777e2c4..0c4b36a4bd 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NamespaceCondition.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NamespaceCondition.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * NamespaceCondition contains details about state of namespace. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1NamespaceCondition { public static final String SERIALIZED_NAME_LAST_TRANSITION_TIME = "lastTransitionTime"; @SerializedName(SERIALIZED_NAME_LAST_TRANSITION_TIME) @@ -76,7 +76,6 @@ public V1NamespaceCondition() { } public V1NamespaceCondition lastTransitionTime(OffsetDateTime lastTransitionTime) { - this.lastTransitionTime = lastTransitionTime; return this; } @@ -90,14 +89,12 @@ public OffsetDateTime getLastTransitionTime() { return lastTransitionTime; } - public void setLastTransitionTime(OffsetDateTime lastTransitionTime) { this.lastTransitionTime = lastTransitionTime; } public V1NamespaceCondition message(String message) { - this.message = message; return this; } @@ -111,14 +108,12 @@ public String getMessage() { return message; } - public void setMessage(String message) { this.message = message; } public V1NamespaceCondition reason(String reason) { - this.reason = reason; return this; } @@ -132,14 +127,12 @@ public String getReason() { return reason; } - public void setReason(String reason) { this.reason = reason; } public V1NamespaceCondition status(String status) { - this.status = status; return this; } @@ -153,14 +146,12 @@ public String getStatus() { return status; } - public void setStatus(String status) { this.status = status; } public V1NamespaceCondition type(String type) { - this.type = type; return this; } @@ -174,7 +165,6 @@ public String getType() { return type; } - public void setType(String type) { this.type = type; } @@ -246,32 +236,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1NamespaceCondition + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1NamespaceCondition */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1NamespaceCondition.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1NamespaceCondition.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1NamespaceCondition is not found in the empty JSON string", V1NamespaceCondition.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1NamespaceCondition.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1NamespaceCondition` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1NamespaceCondition` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1NamespaceCondition.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); } @@ -306,9 +297,9 @@ public void write(JsonWriter out, V1NamespaceCondition value) throws IOException @Override public V1NamespaceCondition read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -335,3 +326,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NamespaceList.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NamespaceList.java index 0c7bb53b83..0ba7e3cbc0 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NamespaceList.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NamespaceList.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1Namespace; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * NamespaceList is a list of Namespaces. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1NamespaceList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -75,7 +75,6 @@ public V1NamespaceList() { } public V1NamespaceList apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -89,14 +88,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1NamespaceList items(List items) { - this.items = items; return this; } @@ -118,14 +115,12 @@ public List getItems() { return items; } - public void setItems(List items) { this.items = items; } public V1NamespaceList kind(String kind) { - this.kind = kind; return this; } @@ -139,14 +134,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1NamespaceList metadata(V1ListMeta metadata) { - this.metadata = metadata; return this; } @@ -160,7 +153,6 @@ public V1ListMeta getMetadata() { return metadata; } - public void setMetadata(V1ListMeta metadata) { this.metadata = metadata; } @@ -228,32 +220,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1NamespaceList + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1NamespaceList */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1NamespaceList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1NamespaceList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1NamespaceList is not found in the empty JSON string", V1NamespaceList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1NamespaceList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1NamespaceList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1NamespaceList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1NamespaceList.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -265,14 +258,14 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); // validate the required field `items` (array) for (int i = 0; i < jsonArrayitems.size(); i++) { - V1Namespace.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject()); + V1Namespace.validateJsonElement(jsonArrayitems.get(i)); }; if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ListMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ListMeta.validateJsonElement(jsonObj.get("metadata")); } } @@ -296,9 +289,9 @@ public void write(JsonWriter out, V1NamespaceList value) throws IOException { @Override public V1NamespaceList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -325,3 +318,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NamespaceSpec.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NamespaceSpec.java index 1d8080ae1d..2d870ed49b 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NamespaceSpec.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NamespaceSpec.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -43,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -51,17 +51,16 @@ /** * NamespaceSpec describes the attributes on a Namespace. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1NamespaceSpec { public static final String SERIALIZED_NAME_FINALIZERS = "finalizers"; @SerializedName(SERIALIZED_NAME_FINALIZERS) - private List finalizers; + private List finalizers = new ArrayList<>(); public V1NamespaceSpec() { } public V1NamespaceSpec finalizers(List finalizers) { - this.finalizers = finalizers; return this; } @@ -83,7 +82,6 @@ public List getFinalizers() { return finalizers; } - public void setFinalizers(List finalizers) { this.finalizers = finalizers; } @@ -141,27 +139,28 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1NamespaceSpec + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1NamespaceSpec */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1NamespaceSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1NamespaceSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1NamespaceSpec is not found in the empty JSON string", V1NamespaceSpec.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1NamespaceSpec.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1NamespaceSpec` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1NamespaceSpec` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the optional json data is an array if present - if (jsonObj.get("finalizers") != null && !jsonObj.get("finalizers").isJsonArray()) { + if (jsonObj.get("finalizers") != null && !jsonObj.get("finalizers").isJsonNull() && !jsonObj.get("finalizers").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `finalizers` to be an array in the JSON string but got `%s`", jsonObj.get("finalizers").toString())); } } @@ -186,9 +185,9 @@ public void write(JsonWriter out, V1NamespaceSpec value) throws IOException { @Override public V1NamespaceSpec read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -215,3 +214,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NamespaceStatus.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NamespaceStatus.java index f38900eb47..ea49a29d5b 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NamespaceStatus.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NamespaceStatus.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1NamespaceCondition; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,11 +52,11 @@ /** * NamespaceStatus is information about the current status of a Namespace. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1NamespaceStatus { public static final String SERIALIZED_NAME_CONDITIONS = "conditions"; @SerializedName(SERIALIZED_NAME_CONDITIONS) - private List conditions; + private List conditions = new ArrayList<>(); public static final String SERIALIZED_NAME_PHASE = "phase"; @SerializedName(SERIALIZED_NAME_PHASE) @@ -66,7 +66,6 @@ public V1NamespaceStatus() { } public V1NamespaceStatus conditions(List conditions) { - this.conditions = conditions; return this; } @@ -88,14 +87,12 @@ public List getConditions() { return conditions; } - public void setConditions(List conditions) { this.conditions = conditions; } public V1NamespaceStatus phase(String phase) { - this.phase = phase; return this; } @@ -109,7 +106,6 @@ public String getPhase() { return phase; } - public void setPhase(String phase) { this.phase = phase; } @@ -170,25 +166,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1NamespaceStatus + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1NamespaceStatus */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1NamespaceStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1NamespaceStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1NamespaceStatus is not found in the empty JSON string", V1NamespaceStatus.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1NamespaceStatus.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1NamespaceStatus` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1NamespaceStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (jsonObj.get("conditions") != null && !jsonObj.get("conditions").isJsonNull()) { JsonArray jsonArrayconditions = jsonObj.getAsJsonArray("conditions"); if (jsonArrayconditions != null) { @@ -199,7 +196,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `conditions` (array) for (int i = 0; i < jsonArrayconditions.size(); i++) { - V1NamespaceCondition.validateJsonObject(jsonArrayconditions.get(i).getAsJsonObject()); + V1NamespaceCondition.validateJsonElement(jsonArrayconditions.get(i)); }; } } @@ -228,9 +225,9 @@ public void write(JsonWriter out, V1NamespaceStatus value) throws IOException { @Override public V1NamespaceStatus read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -257,3 +254,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicy.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicy.java index 0789c2ca20..cc736123c1 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicy.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicy.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1NetworkPolicySpec; import io.kubernetes.client.openapi.models.V1ObjectMeta; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -43,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -51,7 +51,7 @@ /** * NetworkPolicy describes what network traffic is allowed for a set of Pods */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1NetworkPolicy implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -73,7 +73,6 @@ public V1NetworkPolicy() { } public V1NetworkPolicy apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -87,14 +86,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1NetworkPolicy kind(String kind) { - this.kind = kind; return this; } @@ -108,14 +105,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1NetworkPolicy metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -129,14 +124,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V1NetworkPolicy spec(V1NetworkPolicySpec spec) { - this.spec = spec; return this; } @@ -150,7 +143,6 @@ public V1NetworkPolicySpec getSpec() { return spec; } - public void setSpec(V1NetworkPolicySpec spec) { this.spec = spec; } @@ -217,25 +209,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1NetworkPolicy + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1NetworkPolicy */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1NetworkPolicy.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1NetworkPolicy.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1NetworkPolicy is not found in the empty JSON string", V1NetworkPolicy.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1NetworkPolicy.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1NetworkPolicy` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1NetworkPolicy` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -244,11 +237,11 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } // validate the optional field `spec` if (jsonObj.get("spec") != null && !jsonObj.get("spec").isJsonNull()) { - V1NetworkPolicySpec.validateJsonObject(jsonObj.getAsJsonObject("spec")); + V1NetworkPolicySpec.validateJsonElement(jsonObj.get("spec")); } } @@ -272,9 +265,9 @@ public void write(JsonWriter out, V1NetworkPolicy value) throws IOException { @Override public V1NetworkPolicy read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -301,3 +294,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyEgressRule.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyEgressRule.java index 814565044d..fa1180f84f 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyEgressRule.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyEgressRule.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1NetworkPolicyPort; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,21 +53,20 @@ /** * NetworkPolicyEgressRule describes a particular set of traffic that is allowed out of pods matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and to. This type is beta-level in 1.8 */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1NetworkPolicyEgressRule { public static final String SERIALIZED_NAME_PORTS = "ports"; @SerializedName(SERIALIZED_NAME_PORTS) - private List ports; + private List ports = new ArrayList<>(); public static final String SERIALIZED_NAME_TO = "to"; @SerializedName(SERIALIZED_NAME_TO) - private List to; + private List to = new ArrayList<>(); public V1NetworkPolicyEgressRule() { } public V1NetworkPolicyEgressRule ports(List ports) { - this.ports = ports; return this; } @@ -89,14 +88,12 @@ public List getPorts() { return ports; } - public void setPorts(List ports) { this.ports = ports; } public V1NetworkPolicyEgressRule to(List to) { - this.to = to; return this; } @@ -118,7 +115,6 @@ public List getTo() { return to; } - public void setTo(List to) { this.to = to; } @@ -179,25 +175,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1NetworkPolicyEgressRule + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1NetworkPolicyEgressRule */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1NetworkPolicyEgressRule.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1NetworkPolicyEgressRule.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1NetworkPolicyEgressRule is not found in the empty JSON string", V1NetworkPolicyEgressRule.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1NetworkPolicyEgressRule.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1NetworkPolicyEgressRule` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1NetworkPolicyEgressRule` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (jsonObj.get("ports") != null && !jsonObj.get("ports").isJsonNull()) { JsonArray jsonArrayports = jsonObj.getAsJsonArray("ports"); if (jsonArrayports != null) { @@ -208,7 +205,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `ports` (array) for (int i = 0; i < jsonArrayports.size(); i++) { - V1NetworkPolicyPort.validateJsonObject(jsonArrayports.get(i).getAsJsonObject()); + V1NetworkPolicyPort.validateJsonElement(jsonArrayports.get(i)); }; } } @@ -222,7 +219,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `to` (array) for (int i = 0; i < jsonArrayto.size(); i++) { - V1NetworkPolicyPeer.validateJsonObject(jsonArrayto.get(i).getAsJsonObject()); + V1NetworkPolicyPeer.validateJsonElement(jsonArrayto.get(i)); }; } } @@ -248,9 +245,9 @@ public void write(JsonWriter out, V1NetworkPolicyEgressRule value) throws IOExce @Override public V1NetworkPolicyEgressRule read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -277,3 +274,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyIngressRule.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyIngressRule.java index fa242bf7c5..f760a9a79f 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyIngressRule.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyIngressRule.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1NetworkPolicyPort; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,21 +53,20 @@ /** * NetworkPolicyIngressRule describes a particular set of traffic that is allowed to the pods matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and from. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1NetworkPolicyIngressRule { public static final String SERIALIZED_NAME_FROM = "from"; @SerializedName(SERIALIZED_NAME_FROM) - private List from; + private List from = new ArrayList<>(); public static final String SERIALIZED_NAME_PORTS = "ports"; @SerializedName(SERIALIZED_NAME_PORTS) - private List ports; + private List ports = new ArrayList<>(); public V1NetworkPolicyIngressRule() { } public V1NetworkPolicyIngressRule from(List from) { - this.from = from; return this; } @@ -89,14 +88,12 @@ public List getFrom() { return from; } - public void setFrom(List from) { this.from = from; } public V1NetworkPolicyIngressRule ports(List ports) { - this.ports = ports; return this; } @@ -118,7 +115,6 @@ public List getPorts() { return ports; } - public void setPorts(List ports) { this.ports = ports; } @@ -179,25 +175,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1NetworkPolicyIngressRule + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1NetworkPolicyIngressRule */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1NetworkPolicyIngressRule.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1NetworkPolicyIngressRule.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1NetworkPolicyIngressRule is not found in the empty JSON string", V1NetworkPolicyIngressRule.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1NetworkPolicyIngressRule.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1NetworkPolicyIngressRule` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1NetworkPolicyIngressRule` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (jsonObj.get("from") != null && !jsonObj.get("from").isJsonNull()) { JsonArray jsonArrayfrom = jsonObj.getAsJsonArray("from"); if (jsonArrayfrom != null) { @@ -208,7 +205,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `from` (array) for (int i = 0; i < jsonArrayfrom.size(); i++) { - V1NetworkPolicyPeer.validateJsonObject(jsonArrayfrom.get(i).getAsJsonObject()); + V1NetworkPolicyPeer.validateJsonElement(jsonArrayfrom.get(i)); }; } } @@ -222,7 +219,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `ports` (array) for (int i = 0; i < jsonArrayports.size(); i++) { - V1NetworkPolicyPort.validateJsonObject(jsonArrayports.get(i).getAsJsonObject()); + V1NetworkPolicyPort.validateJsonElement(jsonArrayports.get(i)); }; } } @@ -248,9 +245,9 @@ public void write(JsonWriter out, V1NetworkPolicyIngressRule value) throws IOExc @Override public V1NetworkPolicyIngressRule read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -277,3 +274,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyList.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyList.java index e5efcd20a0..1b37d4bbc4 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyList.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyList.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1NetworkPolicy; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * NetworkPolicyList is a list of NetworkPolicy objects. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1NetworkPolicyList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -75,7 +75,6 @@ public V1NetworkPolicyList() { } public V1NetworkPolicyList apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -89,14 +88,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1NetworkPolicyList items(List items) { - this.items = items; return this; } @@ -118,14 +115,12 @@ public List getItems() { return items; } - public void setItems(List items) { this.items = items; } public V1NetworkPolicyList kind(String kind) { - this.kind = kind; return this; } @@ -139,14 +134,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1NetworkPolicyList metadata(V1ListMeta metadata) { - this.metadata = metadata; return this; } @@ -160,7 +153,6 @@ public V1ListMeta getMetadata() { return metadata; } - public void setMetadata(V1ListMeta metadata) { this.metadata = metadata; } @@ -228,32 +220,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1NetworkPolicyList + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1NetworkPolicyList */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1NetworkPolicyList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1NetworkPolicyList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1NetworkPolicyList is not found in the empty JSON string", V1NetworkPolicyList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1NetworkPolicyList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1NetworkPolicyList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1NetworkPolicyList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1NetworkPolicyList.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -265,14 +258,14 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); // validate the required field `items` (array) for (int i = 0; i < jsonArrayitems.size(); i++) { - V1NetworkPolicy.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject()); + V1NetworkPolicy.validateJsonElement(jsonArrayitems.get(i)); }; if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ListMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ListMeta.validateJsonElement(jsonObj.get("metadata")); } } @@ -296,9 +289,9 @@ public void write(JsonWriter out, V1NetworkPolicyList value) throws IOException @Override public V1NetworkPolicyList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -325,3 +318,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyPeer.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyPeer.java index 3cd5b3fc96..ea6f5e426b 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyPeer.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyPeer.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1IPBlock; import io.kubernetes.client.openapi.models.V1LabelSelector; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -43,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -51,7 +51,7 @@ /** * NetworkPolicyPeer describes a peer to allow traffic to/from. Only certain combinations of fields are allowed */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1NetworkPolicyPeer { public static final String SERIALIZED_NAME_IP_BLOCK = "ipBlock"; @SerializedName(SERIALIZED_NAME_IP_BLOCK) @@ -69,7 +69,6 @@ public V1NetworkPolicyPeer() { } public V1NetworkPolicyPeer ipBlock(V1IPBlock ipBlock) { - this.ipBlock = ipBlock; return this; } @@ -83,14 +82,12 @@ public V1IPBlock getIpBlock() { return ipBlock; } - public void setIpBlock(V1IPBlock ipBlock) { this.ipBlock = ipBlock; } public V1NetworkPolicyPeer namespaceSelector(V1LabelSelector namespaceSelector) { - this.namespaceSelector = namespaceSelector; return this; } @@ -104,14 +101,12 @@ public V1LabelSelector getNamespaceSelector() { return namespaceSelector; } - public void setNamespaceSelector(V1LabelSelector namespaceSelector) { this.namespaceSelector = namespaceSelector; } public V1NetworkPolicyPeer podSelector(V1LabelSelector podSelector) { - this.podSelector = podSelector; return this; } @@ -125,7 +120,6 @@ public V1LabelSelector getPodSelector() { return podSelector; } - public void setPodSelector(V1LabelSelector podSelector) { this.podSelector = podSelector; } @@ -189,36 +183,37 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1NetworkPolicyPeer + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1NetworkPolicyPeer */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1NetworkPolicyPeer.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1NetworkPolicyPeer.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1NetworkPolicyPeer is not found in the empty JSON string", V1NetworkPolicyPeer.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1NetworkPolicyPeer.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1NetworkPolicyPeer` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1NetworkPolicyPeer` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `ipBlock` if (jsonObj.get("ipBlock") != null && !jsonObj.get("ipBlock").isJsonNull()) { - V1IPBlock.validateJsonObject(jsonObj.getAsJsonObject("ipBlock")); + V1IPBlock.validateJsonElement(jsonObj.get("ipBlock")); } // validate the optional field `namespaceSelector` if (jsonObj.get("namespaceSelector") != null && !jsonObj.get("namespaceSelector").isJsonNull()) { - V1LabelSelector.validateJsonObject(jsonObj.getAsJsonObject("namespaceSelector")); + V1LabelSelector.validateJsonElement(jsonObj.get("namespaceSelector")); } // validate the optional field `podSelector` if (jsonObj.get("podSelector") != null && !jsonObj.get("podSelector").isJsonNull()) { - V1LabelSelector.validateJsonObject(jsonObj.getAsJsonObject("podSelector")); + V1LabelSelector.validateJsonElement(jsonObj.get("podSelector")); } } @@ -242,9 +237,9 @@ public void write(JsonWriter out, V1NetworkPolicyPeer value) throws IOException @Override public V1NetworkPolicyPeer read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -271,3 +266,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyPort.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyPort.java index e70e899aee..b4933c39ba 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyPort.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyPort.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.custom.IntOrString; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * NetworkPolicyPort describes a port to allow traffic on */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1NetworkPolicyPort { public static final String SERIALIZED_NAME_END_PORT = "endPort"; @SerializedName(SERIALIZED_NAME_END_PORT) @@ -68,7 +68,6 @@ public V1NetworkPolicyPort() { } public V1NetworkPolicyPort endPort(Integer endPort) { - this.endPort = endPort; return this; } @@ -82,14 +81,12 @@ public Integer getEndPort() { return endPort; } - public void setEndPort(Integer endPort) { this.endPort = endPort; } public V1NetworkPolicyPort port(IntOrString port) { - this.port = port; return this; } @@ -103,14 +100,12 @@ public IntOrString getPort() { return port; } - public void setPort(IntOrString port) { this.port = port; } public V1NetworkPolicyPort protocol(String protocol) { - this.protocol = protocol; return this; } @@ -124,7 +119,6 @@ public String getProtocol() { return protocol; } - public void setProtocol(String protocol) { this.protocol = protocol; } @@ -188,25 +182,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1NetworkPolicyPort + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1NetworkPolicyPort */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1NetworkPolicyPort.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1NetworkPolicyPort.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1NetworkPolicyPort is not found in the empty JSON string", V1NetworkPolicyPort.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1NetworkPolicyPort.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1NetworkPolicyPort` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1NetworkPolicyPort` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("port") != null && !jsonObj.get("port").isJsonNull()) && !jsonObj.get("port").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `port` to be a primitive type in the JSON string but got `%s`", jsonObj.get("port").toString())); } @@ -235,9 +230,9 @@ public void write(JsonWriter out, V1NetworkPolicyPort value) throws IOException @Override public V1NetworkPolicyPort read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -264,3 +259,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicySpec.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicySpec.java index c433353691..e3ab5acbdc 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicySpec.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicySpec.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -24,6 +24,7 @@ import io.kubernetes.client.openapi.models.V1NetworkPolicyIngressRule; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -46,7 +47,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -54,15 +54,15 @@ /** * NetworkPolicySpec provides the specification of a NetworkPolicy */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1NetworkPolicySpec { public static final String SERIALIZED_NAME_EGRESS = "egress"; @SerializedName(SERIALIZED_NAME_EGRESS) - private List egress; + private List egress = new ArrayList<>(); public static final String SERIALIZED_NAME_INGRESS = "ingress"; @SerializedName(SERIALIZED_NAME_INGRESS) - private List ingress; + private List ingress = new ArrayList<>(); public static final String SERIALIZED_NAME_POD_SELECTOR = "podSelector"; @SerializedName(SERIALIZED_NAME_POD_SELECTOR) @@ -70,13 +70,12 @@ public class V1NetworkPolicySpec { public static final String SERIALIZED_NAME_POLICY_TYPES = "policyTypes"; @SerializedName(SERIALIZED_NAME_POLICY_TYPES) - private List policyTypes; + private List policyTypes = new ArrayList<>(); public V1NetworkPolicySpec() { } public V1NetworkPolicySpec egress(List egress) { - this.egress = egress; return this; } @@ -98,14 +97,12 @@ public List getEgress() { return egress; } - public void setEgress(List egress) { this.egress = egress; } public V1NetworkPolicySpec ingress(List ingress) { - this.ingress = ingress; return this; } @@ -127,14 +124,12 @@ public List getIngress() { return ingress; } - public void setIngress(List ingress) { this.ingress = ingress; } public V1NetworkPolicySpec podSelector(V1LabelSelector podSelector) { - this.podSelector = podSelector; return this; } @@ -148,14 +143,12 @@ public V1LabelSelector getPodSelector() { return podSelector; } - public void setPodSelector(V1LabelSelector podSelector) { this.podSelector = podSelector; } public V1NetworkPolicySpec policyTypes(List policyTypes) { - this.policyTypes = policyTypes; return this; } @@ -177,7 +170,6 @@ public List getPolicyTypes() { return policyTypes; } - public void setPolicyTypes(List policyTypes) { this.policyTypes = policyTypes; } @@ -245,32 +237,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1NetworkPolicySpec + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1NetworkPolicySpec */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1NetworkPolicySpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1NetworkPolicySpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1NetworkPolicySpec is not found in the empty JSON string", V1NetworkPolicySpec.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1NetworkPolicySpec.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1NetworkPolicySpec` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1NetworkPolicySpec` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1NetworkPolicySpec.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (jsonObj.get("egress") != null && !jsonObj.get("egress").isJsonNull()) { JsonArray jsonArrayegress = jsonObj.getAsJsonArray("egress"); if (jsonArrayegress != null) { @@ -281,7 +274,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `egress` (array) for (int i = 0; i < jsonArrayegress.size(); i++) { - V1NetworkPolicyEgressRule.validateJsonObject(jsonArrayegress.get(i).getAsJsonObject()); + V1NetworkPolicyEgressRule.validateJsonElement(jsonArrayegress.get(i)); }; } } @@ -295,14 +288,14 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `ingress` (array) for (int i = 0; i < jsonArrayingress.size(); i++) { - V1NetworkPolicyIngressRule.validateJsonObject(jsonArrayingress.get(i).getAsJsonObject()); + V1NetworkPolicyIngressRule.validateJsonElement(jsonArrayingress.get(i)); }; } } // validate the required field `podSelector` - V1LabelSelector.validateJsonObject(jsonObj.getAsJsonObject("podSelector")); + V1LabelSelector.validateJsonElement(jsonObj.get("podSelector")); // ensure the optional json data is an array if present - if (jsonObj.get("policyTypes") != null && !jsonObj.get("policyTypes").isJsonArray()) { + if (jsonObj.get("policyTypes") != null && !jsonObj.get("policyTypes").isJsonNull() && !jsonObj.get("policyTypes").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `policyTypes` to be an array in the JSON string but got `%s`", jsonObj.get("policyTypes").toString())); } } @@ -327,9 +320,9 @@ public void write(JsonWriter out, V1NetworkPolicySpec value) throws IOException @Override public V1NetworkPolicySpec read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -356,3 +349,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Node.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Node.java index 39aef765d8..bf32001cde 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Node.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Node.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1NodeStatus; import io.kubernetes.client.openapi.models.V1ObjectMeta; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * Node is a worker node in Kubernetes. Each node will have a unique identifier in the cache (i.e. in etcd). */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1Node implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -78,7 +78,6 @@ public V1Node() { } public V1Node apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -92,14 +91,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1Node kind(String kind) { - this.kind = kind; return this; } @@ -113,14 +110,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1Node metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -134,14 +129,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V1Node spec(V1NodeSpec spec) { - this.spec = spec; return this; } @@ -155,14 +148,12 @@ public V1NodeSpec getSpec() { return spec; } - public void setSpec(V1NodeSpec spec) { this.spec = spec; } public V1Node status(V1NodeStatus status) { - this.status = status; return this; } @@ -176,7 +167,6 @@ public V1NodeStatus getStatus() { return status; } - public void setStatus(V1NodeStatus status) { this.status = status; } @@ -246,25 +236,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1Node + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1Node */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1Node.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1Node.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1Node is not found in the empty JSON string", V1Node.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1Node.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1Node` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1Node` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -273,15 +264,15 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } // validate the optional field `spec` if (jsonObj.get("spec") != null && !jsonObj.get("spec").isJsonNull()) { - V1NodeSpec.validateJsonObject(jsonObj.getAsJsonObject("spec")); + V1NodeSpec.validateJsonElement(jsonObj.get("spec")); } // validate the optional field `status` if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { - V1NodeStatus.validateJsonObject(jsonObj.getAsJsonObject("status")); + V1NodeStatus.validateJsonElement(jsonObj.get("status")); } } @@ -305,9 +296,9 @@ public void write(JsonWriter out, V1Node value) throws IOException { @Override public V1Node read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -334,3 +325,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NodeAddress.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NodeAddress.java index 8d12d63551..c465da0a34 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NodeAddress.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NodeAddress.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * NodeAddress contains information for the node's address. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1NodeAddress { public static final String SERIALIZED_NAME_ADDRESS = "address"; @SerializedName(SERIALIZED_NAME_ADDRESS) @@ -63,7 +63,6 @@ public V1NodeAddress() { } public V1NodeAddress address(String address) { - this.address = address; return this; } @@ -77,14 +76,12 @@ public String getAddress() { return address; } - public void setAddress(String address) { this.address = address; } public V1NodeAddress type(String type) { - this.type = type; return this; } @@ -98,7 +95,6 @@ public String getType() { return type; } - public void setType(String type) { this.type = type; } @@ -161,32 +157,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1NodeAddress + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1NodeAddress */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1NodeAddress.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1NodeAddress.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1NodeAddress is not found in the empty JSON string", V1NodeAddress.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1NodeAddress.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1NodeAddress` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1NodeAddress` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1NodeAddress.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("address").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); } @@ -215,9 +212,9 @@ public void write(JsonWriter out, V1NodeAddress value) throws IOException { @Override public V1NodeAddress read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -244,3 +241,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NodeAffinity.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NodeAffinity.java index 8e608469e2..d91b7bf921 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NodeAffinity.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NodeAffinity.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1PreferredSchedulingTerm; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,11 +53,11 @@ /** * Node affinity is a group of node affinity scheduling rules. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1NodeAffinity { public static final String SERIALIZED_NAME_PREFERRED_DURING_SCHEDULING_IGNORED_DURING_EXECUTION = "preferredDuringSchedulingIgnoredDuringExecution"; @SerializedName(SERIALIZED_NAME_PREFERRED_DURING_SCHEDULING_IGNORED_DURING_EXECUTION) - private List preferredDuringSchedulingIgnoredDuringExecution; + private List preferredDuringSchedulingIgnoredDuringExecution = new ArrayList<>(); public static final String SERIALIZED_NAME_REQUIRED_DURING_SCHEDULING_IGNORED_DURING_EXECUTION = "requiredDuringSchedulingIgnoredDuringExecution"; @SerializedName(SERIALIZED_NAME_REQUIRED_DURING_SCHEDULING_IGNORED_DURING_EXECUTION) @@ -67,7 +67,6 @@ public V1NodeAffinity() { } public V1NodeAffinity preferredDuringSchedulingIgnoredDuringExecution(List preferredDuringSchedulingIgnoredDuringExecution) { - this.preferredDuringSchedulingIgnoredDuringExecution = preferredDuringSchedulingIgnoredDuringExecution; return this; } @@ -89,14 +88,12 @@ public List getPreferredDuringSchedulingIgnoredDuring return preferredDuringSchedulingIgnoredDuringExecution; } - public void setPreferredDuringSchedulingIgnoredDuringExecution(List preferredDuringSchedulingIgnoredDuringExecution) { this.preferredDuringSchedulingIgnoredDuringExecution = preferredDuringSchedulingIgnoredDuringExecution; } public V1NodeAffinity requiredDuringSchedulingIgnoredDuringExecution(V1NodeSelector requiredDuringSchedulingIgnoredDuringExecution) { - this.requiredDuringSchedulingIgnoredDuringExecution = requiredDuringSchedulingIgnoredDuringExecution; return this; } @@ -110,7 +107,6 @@ public V1NodeSelector getRequiredDuringSchedulingIgnoredDuringExecution() { return requiredDuringSchedulingIgnoredDuringExecution; } - public void setRequiredDuringSchedulingIgnoredDuringExecution(V1NodeSelector requiredDuringSchedulingIgnoredDuringExecution) { this.requiredDuringSchedulingIgnoredDuringExecution = requiredDuringSchedulingIgnoredDuringExecution; } @@ -171,25 +167,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1NodeAffinity + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1NodeAffinity */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1NodeAffinity.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1NodeAffinity.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1NodeAffinity is not found in the empty JSON string", V1NodeAffinity.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1NodeAffinity.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1NodeAffinity` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1NodeAffinity` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (jsonObj.get("preferredDuringSchedulingIgnoredDuringExecution") != null && !jsonObj.get("preferredDuringSchedulingIgnoredDuringExecution").isJsonNull()) { JsonArray jsonArraypreferredDuringSchedulingIgnoredDuringExecution = jsonObj.getAsJsonArray("preferredDuringSchedulingIgnoredDuringExecution"); if (jsonArraypreferredDuringSchedulingIgnoredDuringExecution != null) { @@ -200,13 +197,13 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `preferredDuringSchedulingIgnoredDuringExecution` (array) for (int i = 0; i < jsonArraypreferredDuringSchedulingIgnoredDuringExecution.size(); i++) { - V1PreferredSchedulingTerm.validateJsonObject(jsonArraypreferredDuringSchedulingIgnoredDuringExecution.get(i).getAsJsonObject()); + V1PreferredSchedulingTerm.validateJsonElement(jsonArraypreferredDuringSchedulingIgnoredDuringExecution.get(i)); }; } } // validate the optional field `requiredDuringSchedulingIgnoredDuringExecution` if (jsonObj.get("requiredDuringSchedulingIgnoredDuringExecution") != null && !jsonObj.get("requiredDuringSchedulingIgnoredDuringExecution").isJsonNull()) { - V1NodeSelector.validateJsonObject(jsonObj.getAsJsonObject("requiredDuringSchedulingIgnoredDuringExecution")); + V1NodeSelector.validateJsonElement(jsonObj.get("requiredDuringSchedulingIgnoredDuringExecution")); } } @@ -230,9 +227,9 @@ public void write(JsonWriter out, V1NodeAffinity value) throws IOException { @Override public V1NodeAffinity read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -259,3 +256,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NodeCondition.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NodeCondition.java index 5bbbed1ab9..2f98ca09fa 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NodeCondition.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NodeCondition.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * NodeCondition contains condition information for a node. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1NodeCondition { public static final String SERIALIZED_NAME_LAST_HEARTBEAT_TIME = "lastHeartbeatTime"; @SerializedName(SERIALIZED_NAME_LAST_HEARTBEAT_TIME) @@ -80,7 +80,6 @@ public V1NodeCondition() { } public V1NodeCondition lastHeartbeatTime(OffsetDateTime lastHeartbeatTime) { - this.lastHeartbeatTime = lastHeartbeatTime; return this; } @@ -94,14 +93,12 @@ public OffsetDateTime getLastHeartbeatTime() { return lastHeartbeatTime; } - public void setLastHeartbeatTime(OffsetDateTime lastHeartbeatTime) { this.lastHeartbeatTime = lastHeartbeatTime; } public V1NodeCondition lastTransitionTime(OffsetDateTime lastTransitionTime) { - this.lastTransitionTime = lastTransitionTime; return this; } @@ -115,14 +112,12 @@ public OffsetDateTime getLastTransitionTime() { return lastTransitionTime; } - public void setLastTransitionTime(OffsetDateTime lastTransitionTime) { this.lastTransitionTime = lastTransitionTime; } public V1NodeCondition message(String message) { - this.message = message; return this; } @@ -136,14 +131,12 @@ public String getMessage() { return message; } - public void setMessage(String message) { this.message = message; } public V1NodeCondition reason(String reason) { - this.reason = reason; return this; } @@ -157,14 +150,12 @@ public String getReason() { return reason; } - public void setReason(String reason) { this.reason = reason; } public V1NodeCondition status(String status) { - this.status = status; return this; } @@ -178,14 +169,12 @@ public String getStatus() { return status; } - public void setStatus(String status) { this.status = status; } public V1NodeCondition type(String type) { - this.type = type; return this; } @@ -199,7 +188,6 @@ public String getType() { return type; } - public void setType(String type) { this.type = type; } @@ -274,32 +262,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1NodeCondition + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1NodeCondition */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1NodeCondition.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1NodeCondition.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1NodeCondition is not found in the empty JSON string", V1NodeCondition.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1NodeCondition.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1NodeCondition` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1NodeCondition` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1NodeCondition.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); } @@ -334,9 +323,9 @@ public void write(JsonWriter out, V1NodeCondition value) throws IOException { @Override public V1NodeCondition read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -363,3 +352,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NodeConfigSource.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NodeConfigSource.java index c1416b320a..b87cb4661c 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NodeConfigSource.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NodeConfigSource.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.openapi.models.V1ConfigMapNodeConfigSource; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * NodeConfigSource specifies a source of node configuration. Exactly one subfield (excluding metadata) must be non-nil. This API is deprecated since 1.22 */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1NodeConfigSource { public static final String SERIALIZED_NAME_CONFIG_MAP = "configMap"; @SerializedName(SERIALIZED_NAME_CONFIG_MAP) @@ -60,7 +60,6 @@ public V1NodeConfigSource() { } public V1NodeConfigSource configMap(V1ConfigMapNodeConfigSource configMap) { - this.configMap = configMap; return this; } @@ -74,7 +73,6 @@ public V1ConfigMapNodeConfigSource getConfigMap() { return configMap; } - public void setConfigMap(V1ConfigMapNodeConfigSource configMap) { this.configMap = configMap; } @@ -132,28 +130,29 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1NodeConfigSource + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1NodeConfigSource */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1NodeConfigSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1NodeConfigSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1NodeConfigSource is not found in the empty JSON string", V1NodeConfigSource.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1NodeConfigSource.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1NodeConfigSource` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1NodeConfigSource` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `configMap` if (jsonObj.get("configMap") != null && !jsonObj.get("configMap").isJsonNull()) { - V1ConfigMapNodeConfigSource.validateJsonObject(jsonObj.getAsJsonObject("configMap")); + V1ConfigMapNodeConfigSource.validateJsonElement(jsonObj.get("configMap")); } } @@ -177,9 +176,9 @@ public void write(JsonWriter out, V1NodeConfigSource value) throws IOException { @Override public V1NodeConfigSource read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -206,3 +205,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NodeConfigStatus.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NodeConfigStatus.java index b0ee661d61..7e2d1f7ed2 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NodeConfigStatus.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NodeConfigStatus.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.openapi.models.V1NodeConfigSource; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * NodeConfigStatus describes the status of the config assigned by Node.Spec.ConfigSource. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1NodeConfigStatus { public static final String SERIALIZED_NAME_ACTIVE = "active"; @SerializedName(SERIALIZED_NAME_ACTIVE) @@ -72,7 +72,6 @@ public V1NodeConfigStatus() { } public V1NodeConfigStatus active(V1NodeConfigSource active) { - this.active = active; return this; } @@ -86,14 +85,12 @@ public V1NodeConfigSource getActive() { return active; } - public void setActive(V1NodeConfigSource active) { this.active = active; } public V1NodeConfigStatus assigned(V1NodeConfigSource assigned) { - this.assigned = assigned; return this; } @@ -107,14 +104,12 @@ public V1NodeConfigSource getAssigned() { return assigned; } - public void setAssigned(V1NodeConfigSource assigned) { this.assigned = assigned; } public V1NodeConfigStatus error(String error) { - this.error = error; return this; } @@ -128,14 +123,12 @@ public String getError() { return error; } - public void setError(String error) { this.error = error; } public V1NodeConfigStatus lastKnownGood(V1NodeConfigSource lastKnownGood) { - this.lastKnownGood = lastKnownGood; return this; } @@ -149,7 +142,6 @@ public V1NodeConfigSource getLastKnownGood() { return lastKnownGood; } - public void setLastKnownGood(V1NodeConfigSource lastKnownGood) { this.lastKnownGood = lastKnownGood; } @@ -216,39 +208,40 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1NodeConfigStatus + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1NodeConfigStatus */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1NodeConfigStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1NodeConfigStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1NodeConfigStatus is not found in the empty JSON string", V1NodeConfigStatus.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1NodeConfigStatus.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1NodeConfigStatus` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1NodeConfigStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `active` if (jsonObj.get("active") != null && !jsonObj.get("active").isJsonNull()) { - V1NodeConfigSource.validateJsonObject(jsonObj.getAsJsonObject("active")); + V1NodeConfigSource.validateJsonElement(jsonObj.get("active")); } // validate the optional field `assigned` if (jsonObj.get("assigned") != null && !jsonObj.get("assigned").isJsonNull()) { - V1NodeConfigSource.validateJsonObject(jsonObj.getAsJsonObject("assigned")); + V1NodeConfigSource.validateJsonElement(jsonObj.get("assigned")); } if ((jsonObj.get("error") != null && !jsonObj.get("error").isJsonNull()) && !jsonObj.get("error").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `error` to be a primitive type in the JSON string but got `%s`", jsonObj.get("error").toString())); } // validate the optional field `lastKnownGood` if (jsonObj.get("lastKnownGood") != null && !jsonObj.get("lastKnownGood").isJsonNull()) { - V1NodeConfigSource.validateJsonObject(jsonObj.getAsJsonObject("lastKnownGood")); + V1NodeConfigSource.validateJsonElement(jsonObj.get("lastKnownGood")); } } @@ -272,9 +265,9 @@ public void write(JsonWriter out, V1NodeConfigStatus value) throws IOException { @Override public V1NodeConfigStatus read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -301,3 +294,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NodeDaemonEndpoints.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NodeDaemonEndpoints.java index 72b57cd178..df456ea8e9 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NodeDaemonEndpoints.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NodeDaemonEndpoints.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.openapi.models.V1DaemonEndpoint; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * NodeDaemonEndpoints lists ports opened by daemons running on the Node. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1NodeDaemonEndpoints { public static final String SERIALIZED_NAME_KUBELET_ENDPOINT = "kubeletEndpoint"; @SerializedName(SERIALIZED_NAME_KUBELET_ENDPOINT) @@ -60,7 +60,6 @@ public V1NodeDaemonEndpoints() { } public V1NodeDaemonEndpoints kubeletEndpoint(V1DaemonEndpoint kubeletEndpoint) { - this.kubeletEndpoint = kubeletEndpoint; return this; } @@ -74,7 +73,6 @@ public V1DaemonEndpoint getKubeletEndpoint() { return kubeletEndpoint; } - public void setKubeletEndpoint(V1DaemonEndpoint kubeletEndpoint) { this.kubeletEndpoint = kubeletEndpoint; } @@ -132,28 +130,29 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1NodeDaemonEndpoints + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1NodeDaemonEndpoints */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1NodeDaemonEndpoints.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1NodeDaemonEndpoints.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1NodeDaemonEndpoints is not found in the empty JSON string", V1NodeDaemonEndpoints.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1NodeDaemonEndpoints.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1NodeDaemonEndpoints` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1NodeDaemonEndpoints` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `kubeletEndpoint` if (jsonObj.get("kubeletEndpoint") != null && !jsonObj.get("kubeletEndpoint").isJsonNull()) { - V1DaemonEndpoint.validateJsonObject(jsonObj.getAsJsonObject("kubeletEndpoint")); + V1DaemonEndpoint.validateJsonElement(jsonObj.get("kubeletEndpoint")); } } @@ -177,9 +176,9 @@ public void write(JsonWriter out, V1NodeDaemonEndpoints value) throws IOExceptio @Override public V1NodeDaemonEndpoints read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -206,3 +205,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NodeList.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NodeList.java index c0e1331bb6..93acac8035 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NodeList.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NodeList.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1Node; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * NodeList is the whole list of all Nodes which have been registered with master. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1NodeList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -75,7 +75,6 @@ public V1NodeList() { } public V1NodeList apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -89,14 +88,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1NodeList items(List items) { - this.items = items; return this; } @@ -118,14 +115,12 @@ public List getItems() { return items; } - public void setItems(List items) { this.items = items; } public V1NodeList kind(String kind) { - this.kind = kind; return this; } @@ -139,14 +134,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1NodeList metadata(V1ListMeta metadata) { - this.metadata = metadata; return this; } @@ -160,7 +153,6 @@ public V1ListMeta getMetadata() { return metadata; } - public void setMetadata(V1ListMeta metadata) { this.metadata = metadata; } @@ -228,32 +220,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1NodeList + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1NodeList */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1NodeList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1NodeList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1NodeList is not found in the empty JSON string", V1NodeList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1NodeList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1NodeList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1NodeList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1NodeList.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -265,14 +258,14 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); // validate the required field `items` (array) for (int i = 0; i < jsonArrayitems.size(); i++) { - V1Node.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject()); + V1Node.validateJsonElement(jsonArrayitems.get(i)); }; if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ListMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ListMeta.validateJsonElement(jsonObj.get("metadata")); } } @@ -296,9 +289,9 @@ public void write(JsonWriter out, V1NodeList value) throws IOException { @Override public V1NodeList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -325,3 +318,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NodeRuntimeHandler.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NodeRuntimeHandler.java index 58066678e2..9652525db8 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NodeRuntimeHandler.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NodeRuntimeHandler.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.openapi.models.V1NodeRuntimeHandlerFeatures; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * NodeRuntimeHandler is a set of runtime handler information. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1NodeRuntimeHandler { public static final String SERIALIZED_NAME_FEATURES = "features"; @SerializedName(SERIALIZED_NAME_FEATURES) @@ -64,7 +64,6 @@ public V1NodeRuntimeHandler() { } public V1NodeRuntimeHandler features(V1NodeRuntimeHandlerFeatures features) { - this.features = features; return this; } @@ -78,14 +77,12 @@ public V1NodeRuntimeHandlerFeatures getFeatures() { return features; } - public void setFeatures(V1NodeRuntimeHandlerFeatures features) { this.features = features; } public V1NodeRuntimeHandler name(String name) { - this.name = name; return this; } @@ -99,7 +96,6 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } @@ -160,28 +156,29 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1NodeRuntimeHandler + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1NodeRuntimeHandler */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1NodeRuntimeHandler.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1NodeRuntimeHandler.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1NodeRuntimeHandler is not found in the empty JSON string", V1NodeRuntimeHandler.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1NodeRuntimeHandler.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1NodeRuntimeHandler` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1NodeRuntimeHandler` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `features` if (jsonObj.get("features") != null && !jsonObj.get("features").isJsonNull()) { - V1NodeRuntimeHandlerFeatures.validateJsonObject(jsonObj.getAsJsonObject("features")); + V1NodeRuntimeHandlerFeatures.validateJsonElement(jsonObj.get("features")); } if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); @@ -208,9 +205,9 @@ public void write(JsonWriter out, V1NodeRuntimeHandler value) throws IOException @Override public V1NodeRuntimeHandler read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -237,3 +234,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NodeRuntimeHandlerFeatures.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NodeRuntimeHandlerFeatures.java index 36419fa0ec..b1254190ae 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NodeRuntimeHandlerFeatures.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NodeRuntimeHandlerFeatures.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * NodeRuntimeHandlerFeatures is a set of runtime features. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1NodeRuntimeHandlerFeatures { public static final String SERIALIZED_NAME_RECURSIVE_READ_ONLY_MOUNTS = "recursiveReadOnlyMounts"; @SerializedName(SERIALIZED_NAME_RECURSIVE_READ_ONLY_MOUNTS) @@ -59,7 +59,6 @@ public V1NodeRuntimeHandlerFeatures() { } public V1NodeRuntimeHandlerFeatures recursiveReadOnlyMounts(Boolean recursiveReadOnlyMounts) { - this.recursiveReadOnlyMounts = recursiveReadOnlyMounts; return this; } @@ -73,7 +72,6 @@ public Boolean getRecursiveReadOnlyMounts() { return recursiveReadOnlyMounts; } - public void setRecursiveReadOnlyMounts(Boolean recursiveReadOnlyMounts) { this.recursiveReadOnlyMounts = recursiveReadOnlyMounts; } @@ -131,25 +129,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1NodeRuntimeHandlerFeatures + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1NodeRuntimeHandlerFeatures */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1NodeRuntimeHandlerFeatures.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1NodeRuntimeHandlerFeatures.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1NodeRuntimeHandlerFeatures is not found in the empty JSON string", V1NodeRuntimeHandlerFeatures.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1NodeRuntimeHandlerFeatures.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1NodeRuntimeHandlerFeatures` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1NodeRuntimeHandlerFeatures` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -172,9 +171,9 @@ public void write(JsonWriter out, V1NodeRuntimeHandlerFeatures value) throws IOE @Override public V1NodeRuntimeHandlerFeatures read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -201,3 +200,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NodeSelector.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NodeSelector.java index 38a265a1e7..7bb1ae7f06 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NodeSelector.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NodeSelector.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1NodeSelectorTerm; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * 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. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1NodeSelector { public static final String SERIALIZED_NAME_NODE_SELECTOR_TERMS = "nodeSelectorTerms"; @SerializedName(SERIALIZED_NAME_NODE_SELECTOR_TERMS) @@ -62,7 +62,6 @@ public V1NodeSelector() { } public V1NodeSelector nodeSelectorTerms(List nodeSelectorTerms) { - this.nodeSelectorTerms = nodeSelectorTerms; return this; } @@ -84,7 +83,6 @@ public List getNodeSelectorTerms() { return nodeSelectorTerms; } - public void setNodeSelectorTerms(List nodeSelectorTerms) { this.nodeSelectorTerms = nodeSelectorTerms; } @@ -143,32 +141,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1NodeSelector + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1NodeSelector */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1NodeSelector.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1NodeSelector.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1NodeSelector is not found in the empty JSON string", V1NodeSelector.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1NodeSelector.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1NodeSelector` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1NodeSelector` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1NodeSelector.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the json data is an array if (!jsonObj.get("nodeSelectorTerms").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `nodeSelectorTerms` to be an array in the JSON string but got `%s`", jsonObj.get("nodeSelectorTerms").toString())); @@ -177,7 +176,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArraynodeSelectorTerms = jsonObj.getAsJsonArray("nodeSelectorTerms"); // validate the required field `nodeSelectorTerms` (array) for (int i = 0; i < jsonArraynodeSelectorTerms.size(); i++) { - V1NodeSelectorTerm.validateJsonObject(jsonArraynodeSelectorTerms.get(i).getAsJsonObject()); + V1NodeSelectorTerm.validateJsonElement(jsonArraynodeSelectorTerms.get(i)); }; } @@ -201,9 +200,9 @@ public void write(JsonWriter out, V1NodeSelector value) throws IOException { @Override public V1NodeSelector read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -230,3 +229,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NodeSelectorRequirement.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NodeSelectorRequirement.java index e832f52a4f..d183ee1e31 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NodeSelectorRequirement.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NodeSelectorRequirement.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -43,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -51,7 +51,7 @@ /** * A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1NodeSelectorRequirement { public static final String SERIALIZED_NAME_KEY = "key"; @SerializedName(SERIALIZED_NAME_KEY) @@ -63,13 +63,12 @@ public class V1NodeSelectorRequirement { public static final String SERIALIZED_NAME_VALUES = "values"; @SerializedName(SERIALIZED_NAME_VALUES) - private List values; + private List values = new ArrayList<>(); public V1NodeSelectorRequirement() { } public V1NodeSelectorRequirement key(String key) { - this.key = key; return this; } @@ -83,14 +82,12 @@ public String getKey() { return key; } - public void setKey(String key) { this.key = key; } public V1NodeSelectorRequirement operator(String operator) { - this.operator = operator; return this; } @@ -104,14 +101,12 @@ public String getOperator() { return operator; } - public void setOperator(String operator) { this.operator = operator; } public V1NodeSelectorRequirement values(List values) { - this.values = values; return this; } @@ -133,7 +128,6 @@ public List getValues() { return values; } - public void setValues(List values) { this.values = values; } @@ -199,32 +193,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1NodeSelectorRequirement + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1NodeSelectorRequirement */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1NodeSelectorRequirement.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1NodeSelectorRequirement.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1NodeSelectorRequirement is not found in the empty JSON string", V1NodeSelectorRequirement.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1NodeSelectorRequirement.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1NodeSelectorRequirement` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1NodeSelectorRequirement` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1NodeSelectorRequirement.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("key").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `key` to be a primitive type in the JSON string but got `%s`", jsonObj.get("key").toString())); } @@ -232,7 +227,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("Expected the field `operator` to be a primitive type in the JSON string but got `%s`", jsonObj.get("operator").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("values") != null && !jsonObj.get("values").isJsonArray()) { + if (jsonObj.get("values") != null && !jsonObj.get("values").isJsonNull() && !jsonObj.get("values").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `values` to be an array in the JSON string but got `%s`", jsonObj.get("values").toString())); } } @@ -257,9 +252,9 @@ public void write(JsonWriter out, V1NodeSelectorRequirement value) throws IOExce @Override public V1NodeSelectorRequirement read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -286,3 +281,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NodeSelectorTerm.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NodeSelectorTerm.java index 8d925c02a4..b7376ecd9b 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NodeSelectorTerm.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NodeSelectorTerm.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1NodeSelectorRequirement; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,21 +52,20 @@ /** * A null or empty node selector term matches no objects. The requirements of them are ANDed. The TopologySelectorTerm type implements a subset of the NodeSelectorTerm. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1NodeSelectorTerm { public static final String SERIALIZED_NAME_MATCH_EXPRESSIONS = "matchExpressions"; @SerializedName(SERIALIZED_NAME_MATCH_EXPRESSIONS) - private List matchExpressions; + private List matchExpressions = new ArrayList<>(); public static final String SERIALIZED_NAME_MATCH_FIELDS = "matchFields"; @SerializedName(SERIALIZED_NAME_MATCH_FIELDS) - private List matchFields; + private List matchFields = new ArrayList<>(); public V1NodeSelectorTerm() { } public V1NodeSelectorTerm matchExpressions(List matchExpressions) { - this.matchExpressions = matchExpressions; return this; } @@ -88,14 +87,12 @@ public List getMatchExpressions() { return matchExpressions; } - public void setMatchExpressions(List matchExpressions) { this.matchExpressions = matchExpressions; } public V1NodeSelectorTerm matchFields(List matchFields) { - this.matchFields = matchFields; return this; } @@ -117,7 +114,6 @@ public List getMatchFields() { return matchFields; } - public void setMatchFields(List matchFields) { this.matchFields = matchFields; } @@ -178,25 +174,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1NodeSelectorTerm + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1NodeSelectorTerm */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1NodeSelectorTerm.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1NodeSelectorTerm.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1NodeSelectorTerm is not found in the empty JSON string", V1NodeSelectorTerm.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1NodeSelectorTerm.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1NodeSelectorTerm` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1NodeSelectorTerm` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (jsonObj.get("matchExpressions") != null && !jsonObj.get("matchExpressions").isJsonNull()) { JsonArray jsonArraymatchExpressions = jsonObj.getAsJsonArray("matchExpressions"); if (jsonArraymatchExpressions != null) { @@ -207,7 +204,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `matchExpressions` (array) for (int i = 0; i < jsonArraymatchExpressions.size(); i++) { - V1NodeSelectorRequirement.validateJsonObject(jsonArraymatchExpressions.get(i).getAsJsonObject()); + V1NodeSelectorRequirement.validateJsonElement(jsonArraymatchExpressions.get(i)); }; } } @@ -221,7 +218,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `matchFields` (array) for (int i = 0; i < jsonArraymatchFields.size(); i++) { - V1NodeSelectorRequirement.validateJsonObject(jsonArraymatchFields.get(i).getAsJsonObject()); + V1NodeSelectorRequirement.validateJsonElement(jsonArraymatchFields.get(i)); }; } } @@ -247,9 +244,9 @@ public void write(JsonWriter out, V1NodeSelectorTerm value) throws IOException { @Override public V1NodeSelectorTerm read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -276,3 +273,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NodeSpec.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NodeSpec.java index 009b86d534..31f808f671 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NodeSpec.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NodeSpec.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1Taint; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * NodeSpec describes the attributes that a node is created with. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1NodeSpec { public static final String SERIALIZED_NAME_CONFIG_SOURCE = "configSource"; @SerializedName(SERIALIZED_NAME_CONFIG_SOURCE) @@ -69,7 +69,7 @@ public class V1NodeSpec { public static final String SERIALIZED_NAME_POD_C_I_D_RS = "podCIDRs"; @SerializedName(SERIALIZED_NAME_POD_C_I_D_RS) - private List podCIDRs; + private List podCIDRs = new ArrayList<>(); public static final String SERIALIZED_NAME_PROVIDER_I_D = "providerID"; @SerializedName(SERIALIZED_NAME_PROVIDER_I_D) @@ -77,7 +77,7 @@ public class V1NodeSpec { public static final String SERIALIZED_NAME_TAINTS = "taints"; @SerializedName(SERIALIZED_NAME_TAINTS) - private List taints; + private List taints = new ArrayList<>(); public static final String SERIALIZED_NAME_UNSCHEDULABLE = "unschedulable"; @SerializedName(SERIALIZED_NAME_UNSCHEDULABLE) @@ -87,7 +87,6 @@ public V1NodeSpec() { } public V1NodeSpec configSource(V1NodeConfigSource configSource) { - this.configSource = configSource; return this; } @@ -101,14 +100,12 @@ public V1NodeConfigSource getConfigSource() { return configSource; } - public void setConfigSource(V1NodeConfigSource configSource) { this.configSource = configSource; } public V1NodeSpec externalID(String externalID) { - this.externalID = externalID; return this; } @@ -122,14 +119,12 @@ public String getExternalID() { return externalID; } - public void setExternalID(String externalID) { this.externalID = externalID; } public V1NodeSpec podCIDR(String podCIDR) { - this.podCIDR = podCIDR; return this; } @@ -143,14 +138,12 @@ public String getPodCIDR() { return podCIDR; } - public void setPodCIDR(String podCIDR) { this.podCIDR = podCIDR; } public V1NodeSpec podCIDRs(List podCIDRs) { - this.podCIDRs = podCIDRs; return this; } @@ -172,14 +165,12 @@ public List getPodCIDRs() { return podCIDRs; } - public void setPodCIDRs(List podCIDRs) { this.podCIDRs = podCIDRs; } public V1NodeSpec providerID(String providerID) { - this.providerID = providerID; return this; } @@ -193,14 +184,12 @@ public String getProviderID() { return providerID; } - public void setProviderID(String providerID) { this.providerID = providerID; } public V1NodeSpec taints(List taints) { - this.taints = taints; return this; } @@ -222,14 +211,12 @@ public List getTaints() { return taints; } - public void setTaints(List taints) { this.taints = taints; } public V1NodeSpec unschedulable(Boolean unschedulable) { - this.unschedulable = unschedulable; return this; } @@ -243,7 +230,6 @@ public Boolean getUnschedulable() { return unschedulable; } - public void setUnschedulable(Boolean unschedulable) { this.unschedulable = unschedulable; } @@ -319,28 +305,29 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1NodeSpec + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1NodeSpec */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1NodeSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1NodeSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1NodeSpec is not found in the empty JSON string", V1NodeSpec.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1NodeSpec.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1NodeSpec` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1NodeSpec` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `configSource` if (jsonObj.get("configSource") != null && !jsonObj.get("configSource").isJsonNull()) { - V1NodeConfigSource.validateJsonObject(jsonObj.getAsJsonObject("configSource")); + V1NodeConfigSource.validateJsonElement(jsonObj.get("configSource")); } if ((jsonObj.get("externalID") != null && !jsonObj.get("externalID").isJsonNull()) && !jsonObj.get("externalID").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `externalID` to be a primitive type in the JSON string but got `%s`", jsonObj.get("externalID").toString())); @@ -349,7 +336,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("Expected the field `podCIDR` to be a primitive type in the JSON string but got `%s`", jsonObj.get("podCIDR").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("podCIDRs") != null && !jsonObj.get("podCIDRs").isJsonArray()) { + if (jsonObj.get("podCIDRs") != null && !jsonObj.get("podCIDRs").isJsonNull() && !jsonObj.get("podCIDRs").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `podCIDRs` to be an array in the JSON string but got `%s`", jsonObj.get("podCIDRs").toString())); } if ((jsonObj.get("providerID") != null && !jsonObj.get("providerID").isJsonNull()) && !jsonObj.get("providerID").isJsonPrimitive()) { @@ -365,7 +352,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `taints` (array) for (int i = 0; i < jsonArraytaints.size(); i++) { - V1Taint.validateJsonObject(jsonArraytaints.get(i).getAsJsonObject()); + V1Taint.validateJsonElement(jsonArraytaints.get(i)); }; } } @@ -391,9 +378,9 @@ public void write(JsonWriter out, V1NodeSpec value) throws IOException { @Override public V1NodeSpec read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -420,3 +407,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NodeStatus.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NodeStatus.java index e25c3fc125..1186276598 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NodeStatus.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NodeStatus.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -30,6 +30,7 @@ import io.kubernetes.client.openapi.models.V1NodeSystemInfo; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -54,7 +55,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -62,11 +62,11 @@ /** * NodeStatus is information about the current status of a node. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1NodeStatus { public static final String SERIALIZED_NAME_ADDRESSES = "addresses"; @SerializedName(SERIALIZED_NAME_ADDRESSES) - private List addresses; + private List addresses = new ArrayList<>(); public static final String SERIALIZED_NAME_ALLOCATABLE = "allocatable"; @SerializedName(SERIALIZED_NAME_ALLOCATABLE) @@ -78,7 +78,7 @@ public class V1NodeStatus { public static final String SERIALIZED_NAME_CONDITIONS = "conditions"; @SerializedName(SERIALIZED_NAME_CONDITIONS) - private List conditions; + private List conditions = new ArrayList<>(); public static final String SERIALIZED_NAME_CONFIG = "config"; @SerializedName(SERIALIZED_NAME_CONFIG) @@ -90,7 +90,7 @@ public class V1NodeStatus { public static final String SERIALIZED_NAME_IMAGES = "images"; @SerializedName(SERIALIZED_NAME_IMAGES) - private List images; + private List images = new ArrayList<>(); public static final String SERIALIZED_NAME_NODE_INFO = "nodeInfo"; @SerializedName(SERIALIZED_NAME_NODE_INFO) @@ -102,21 +102,20 @@ public class V1NodeStatus { public static final String SERIALIZED_NAME_RUNTIME_HANDLERS = "runtimeHandlers"; @SerializedName(SERIALIZED_NAME_RUNTIME_HANDLERS) - private List runtimeHandlers; + private List runtimeHandlers = new ArrayList<>(); public static final String SERIALIZED_NAME_VOLUMES_ATTACHED = "volumesAttached"; @SerializedName(SERIALIZED_NAME_VOLUMES_ATTACHED) - private List volumesAttached; + private List volumesAttached = new ArrayList<>(); public static final String SERIALIZED_NAME_VOLUMES_IN_USE = "volumesInUse"; @SerializedName(SERIALIZED_NAME_VOLUMES_IN_USE) - private List volumesInUse; + private List volumesInUse = new ArrayList<>(); public V1NodeStatus() { } public V1NodeStatus addresses(List addresses) { - this.addresses = addresses; return this; } @@ -138,14 +137,12 @@ public List getAddresses() { return addresses; } - public void setAddresses(List addresses) { this.addresses = addresses; } public V1NodeStatus allocatable(Map allocatable) { - this.allocatable = allocatable; return this; } @@ -167,14 +164,12 @@ public Map getAllocatable() { return allocatable; } - public void setAllocatable(Map allocatable) { this.allocatable = allocatable; } public V1NodeStatus capacity(Map capacity) { - this.capacity = capacity; return this; } @@ -196,14 +191,12 @@ public Map getCapacity() { return capacity; } - public void setCapacity(Map capacity) { this.capacity = capacity; } public V1NodeStatus conditions(List conditions) { - this.conditions = conditions; return this; } @@ -225,14 +218,12 @@ public List getConditions() { return conditions; } - public void setConditions(List conditions) { this.conditions = conditions; } public V1NodeStatus config(V1NodeConfigStatus config) { - this.config = config; return this; } @@ -246,14 +237,12 @@ public V1NodeConfigStatus getConfig() { return config; } - public void setConfig(V1NodeConfigStatus config) { this.config = config; } public V1NodeStatus daemonEndpoints(V1NodeDaemonEndpoints daemonEndpoints) { - this.daemonEndpoints = daemonEndpoints; return this; } @@ -267,14 +256,12 @@ public V1NodeDaemonEndpoints getDaemonEndpoints() { return daemonEndpoints; } - public void setDaemonEndpoints(V1NodeDaemonEndpoints daemonEndpoints) { this.daemonEndpoints = daemonEndpoints; } public V1NodeStatus images(List images) { - this.images = images; return this; } @@ -296,14 +283,12 @@ public List getImages() { return images; } - public void setImages(List images) { this.images = images; } public V1NodeStatus nodeInfo(V1NodeSystemInfo nodeInfo) { - this.nodeInfo = nodeInfo; return this; } @@ -317,14 +302,12 @@ public V1NodeSystemInfo getNodeInfo() { return nodeInfo; } - public void setNodeInfo(V1NodeSystemInfo nodeInfo) { this.nodeInfo = nodeInfo; } public V1NodeStatus phase(String phase) { - this.phase = phase; return this; } @@ -338,14 +321,12 @@ public String getPhase() { return phase; } - public void setPhase(String phase) { this.phase = phase; } public V1NodeStatus runtimeHandlers(List runtimeHandlers) { - this.runtimeHandlers = runtimeHandlers; return this; } @@ -367,14 +348,12 @@ public List getRuntimeHandlers() { return runtimeHandlers; } - public void setRuntimeHandlers(List runtimeHandlers) { this.runtimeHandlers = runtimeHandlers; } public V1NodeStatus volumesAttached(List volumesAttached) { - this.volumesAttached = volumesAttached; return this; } @@ -396,14 +375,12 @@ public List getVolumesAttached() { return volumesAttached; } - public void setVolumesAttached(List volumesAttached) { this.volumesAttached = volumesAttached; } public V1NodeStatus volumesInUse(List volumesInUse) { - this.volumesInUse = volumesInUse; return this; } @@ -425,7 +402,6 @@ public List getVolumesInUse() { return volumesInUse; } - public void setVolumesInUse(List volumesInUse) { this.volumesInUse = volumesInUse; } @@ -516,25 +492,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1NodeStatus + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1NodeStatus */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1NodeStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1NodeStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1NodeStatus is not found in the empty JSON string", V1NodeStatus.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1NodeStatus.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1NodeStatus` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1NodeStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (jsonObj.get("addresses") != null && !jsonObj.get("addresses").isJsonNull()) { JsonArray jsonArrayaddresses = jsonObj.getAsJsonArray("addresses"); if (jsonArrayaddresses != null) { @@ -545,7 +522,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `addresses` (array) for (int i = 0; i < jsonArrayaddresses.size(); i++) { - V1NodeAddress.validateJsonObject(jsonArrayaddresses.get(i).getAsJsonObject()); + V1NodeAddress.validateJsonElement(jsonArrayaddresses.get(i)); }; } } @@ -559,17 +536,17 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `conditions` (array) for (int i = 0; i < jsonArrayconditions.size(); i++) { - V1NodeCondition.validateJsonObject(jsonArrayconditions.get(i).getAsJsonObject()); + V1NodeCondition.validateJsonElement(jsonArrayconditions.get(i)); }; } } // validate the optional field `config` if (jsonObj.get("config") != null && !jsonObj.get("config").isJsonNull()) { - V1NodeConfigStatus.validateJsonObject(jsonObj.getAsJsonObject("config")); + V1NodeConfigStatus.validateJsonElement(jsonObj.get("config")); } // validate the optional field `daemonEndpoints` if (jsonObj.get("daemonEndpoints") != null && !jsonObj.get("daemonEndpoints").isJsonNull()) { - V1NodeDaemonEndpoints.validateJsonObject(jsonObj.getAsJsonObject("daemonEndpoints")); + V1NodeDaemonEndpoints.validateJsonElement(jsonObj.get("daemonEndpoints")); } if (jsonObj.get("images") != null && !jsonObj.get("images").isJsonNull()) { JsonArray jsonArrayimages = jsonObj.getAsJsonArray("images"); @@ -581,13 +558,13 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `images` (array) for (int i = 0; i < jsonArrayimages.size(); i++) { - V1ContainerImage.validateJsonObject(jsonArrayimages.get(i).getAsJsonObject()); + V1ContainerImage.validateJsonElement(jsonArrayimages.get(i)); }; } } // validate the optional field `nodeInfo` if (jsonObj.get("nodeInfo") != null && !jsonObj.get("nodeInfo").isJsonNull()) { - V1NodeSystemInfo.validateJsonObject(jsonObj.getAsJsonObject("nodeInfo")); + V1NodeSystemInfo.validateJsonElement(jsonObj.get("nodeInfo")); } if ((jsonObj.get("phase") != null && !jsonObj.get("phase").isJsonNull()) && !jsonObj.get("phase").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `phase` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phase").toString())); @@ -602,7 +579,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `runtimeHandlers` (array) for (int i = 0; i < jsonArrayruntimeHandlers.size(); i++) { - V1NodeRuntimeHandler.validateJsonObject(jsonArrayruntimeHandlers.get(i).getAsJsonObject()); + V1NodeRuntimeHandler.validateJsonElement(jsonArrayruntimeHandlers.get(i)); }; } } @@ -616,12 +593,12 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `volumesAttached` (array) for (int i = 0; i < jsonArrayvolumesAttached.size(); i++) { - V1AttachedVolume.validateJsonObject(jsonArrayvolumesAttached.get(i).getAsJsonObject()); + V1AttachedVolume.validateJsonElement(jsonArrayvolumesAttached.get(i)); }; } } // ensure the optional json data is an array if present - if (jsonObj.get("volumesInUse") != null && !jsonObj.get("volumesInUse").isJsonArray()) { + if (jsonObj.get("volumesInUse") != null && !jsonObj.get("volumesInUse").isJsonNull() && !jsonObj.get("volumesInUse").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `volumesInUse` to be an array in the JSON string but got `%s`", jsonObj.get("volumesInUse").toString())); } } @@ -646,9 +623,9 @@ public void write(JsonWriter out, V1NodeStatus value) throws IOException { @Override public V1NodeStatus read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -675,3 +652,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NodeSystemInfo.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NodeSystemInfo.java index 61481b0de1..5bbdf4c823 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NodeSystemInfo.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NodeSystemInfo.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * NodeSystemInfo is a set of ids/uuids to uniquely identify the node. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1NodeSystemInfo { public static final String SERIALIZED_NAME_ARCHITECTURE = "architecture"; @SerializedName(SERIALIZED_NAME_ARCHITECTURE) @@ -95,7 +95,6 @@ public V1NodeSystemInfo() { } public V1NodeSystemInfo architecture(String architecture) { - this.architecture = architecture; return this; } @@ -109,14 +108,12 @@ public String getArchitecture() { return architecture; } - public void setArchitecture(String architecture) { this.architecture = architecture; } public V1NodeSystemInfo bootID(String bootID) { - this.bootID = bootID; return this; } @@ -130,14 +127,12 @@ public String getBootID() { return bootID; } - public void setBootID(String bootID) { this.bootID = bootID; } public V1NodeSystemInfo containerRuntimeVersion(String containerRuntimeVersion) { - this.containerRuntimeVersion = containerRuntimeVersion; return this; } @@ -151,14 +146,12 @@ public String getContainerRuntimeVersion() { return containerRuntimeVersion; } - public void setContainerRuntimeVersion(String containerRuntimeVersion) { this.containerRuntimeVersion = containerRuntimeVersion; } public V1NodeSystemInfo kernelVersion(String kernelVersion) { - this.kernelVersion = kernelVersion; return this; } @@ -172,14 +165,12 @@ public String getKernelVersion() { return kernelVersion; } - public void setKernelVersion(String kernelVersion) { this.kernelVersion = kernelVersion; } public V1NodeSystemInfo kubeProxyVersion(String kubeProxyVersion) { - this.kubeProxyVersion = kubeProxyVersion; return this; } @@ -193,14 +184,12 @@ public String getKubeProxyVersion() { return kubeProxyVersion; } - public void setKubeProxyVersion(String kubeProxyVersion) { this.kubeProxyVersion = kubeProxyVersion; } public V1NodeSystemInfo kubeletVersion(String kubeletVersion) { - this.kubeletVersion = kubeletVersion; return this; } @@ -214,14 +203,12 @@ public String getKubeletVersion() { return kubeletVersion; } - public void setKubeletVersion(String kubeletVersion) { this.kubeletVersion = kubeletVersion; } public V1NodeSystemInfo machineID(String machineID) { - this.machineID = machineID; return this; } @@ -235,14 +222,12 @@ public String getMachineID() { return machineID; } - public void setMachineID(String machineID) { this.machineID = machineID; } public V1NodeSystemInfo operatingSystem(String operatingSystem) { - this.operatingSystem = operatingSystem; return this; } @@ -256,14 +241,12 @@ public String getOperatingSystem() { return operatingSystem; } - public void setOperatingSystem(String operatingSystem) { this.operatingSystem = operatingSystem; } public V1NodeSystemInfo osImage(String osImage) { - this.osImage = osImage; return this; } @@ -277,14 +260,12 @@ public String getOsImage() { return osImage; } - public void setOsImage(String osImage) { this.osImage = osImage; } public V1NodeSystemInfo systemUUID(String systemUUID) { - this.systemUUID = systemUUID; return this; } @@ -298,7 +279,6 @@ public String getSystemUUID() { return systemUUID; } - public void setSystemUUID(String systemUUID) { this.systemUUID = systemUUID; } @@ -393,32 +373,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1NodeSystemInfo + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1NodeSystemInfo */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1NodeSystemInfo.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1NodeSystemInfo.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1NodeSystemInfo is not found in the empty JSON string", V1NodeSystemInfo.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1NodeSystemInfo.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1NodeSystemInfo` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1NodeSystemInfo` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1NodeSystemInfo.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("architecture").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `architecture` to be a primitive type in the JSON string but got `%s`", jsonObj.get("architecture").toString())); } @@ -471,9 +452,9 @@ public void write(JsonWriter out, V1NodeSystemInfo value) throws IOException { @Override public V1NodeSystemInfo read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -500,3 +481,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NonResourceAttributes.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NonResourceAttributes.java index 8189af6a20..c02fbdb6f2 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NonResourceAttributes.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NonResourceAttributes.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1NonResourceAttributes { public static final String SERIALIZED_NAME_PATH = "path"; @SerializedName(SERIALIZED_NAME_PATH) @@ -63,7 +63,6 @@ public V1NonResourceAttributes() { } public V1NonResourceAttributes path(String path) { - this.path = path; return this; } @@ -77,14 +76,12 @@ public String getPath() { return path; } - public void setPath(String path) { this.path = path; } public V1NonResourceAttributes verb(String verb) { - this.verb = verb; return this; } @@ -98,7 +95,6 @@ public String getVerb() { return verb; } - public void setVerb(String verb) { this.verb = verb; } @@ -159,25 +155,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1NonResourceAttributes + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1NonResourceAttributes */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1NonResourceAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1NonResourceAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1NonResourceAttributes is not found in the empty JSON string", V1NonResourceAttributes.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1NonResourceAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1NonResourceAttributes` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1NonResourceAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("path") != null && !jsonObj.get("path").isJsonNull()) && !jsonObj.get("path").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `path` to be a primitive type in the JSON string but got `%s`", jsonObj.get("path").toString())); } @@ -206,9 +203,9 @@ public void write(JsonWriter out, V1NonResourceAttributes value) throws IOExcept @Override public V1NonResourceAttributes read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -235,3 +232,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NonResourcePolicyRule.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NonResourcePolicyRule.java index fd9d61c329..7a734b3028 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NonResourcePolicyRule.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NonResourcePolicyRule.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -43,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -51,7 +51,7 @@ /** * NonResourcePolicyRule is a predicate that matches non-resource requests according to their verb and the target non-resource URL. A NonResourcePolicyRule matches a request if and only if both (a) at least one member of verbs matches the request and (b) at least one member of nonResourceURLs matches the request. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1NonResourcePolicyRule { public static final String SERIALIZED_NAME_NON_RESOURCE_U_R_LS = "nonResourceURLs"; @SerializedName(SERIALIZED_NAME_NON_RESOURCE_U_R_LS) @@ -65,7 +65,6 @@ public V1NonResourcePolicyRule() { } public V1NonResourcePolicyRule nonResourceURLs(List nonResourceURLs) { - this.nonResourceURLs = nonResourceURLs; return this; } @@ -87,14 +86,12 @@ public List getNonResourceURLs() { return nonResourceURLs; } - public void setNonResourceURLs(List nonResourceURLs) { this.nonResourceURLs = nonResourceURLs; } public V1NonResourcePolicyRule verbs(List verbs) { - this.verbs = verbs; return this; } @@ -116,7 +113,6 @@ public List getVerbs() { return verbs; } - public void setVerbs(List verbs) { this.verbs = verbs; } @@ -179,32 +175,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1NonResourcePolicyRule + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1NonResourcePolicyRule */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1NonResourcePolicyRule.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1NonResourcePolicyRule.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1NonResourcePolicyRule is not found in the empty JSON string", V1NonResourcePolicyRule.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1NonResourcePolicyRule.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1NonResourcePolicyRule` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1NonResourcePolicyRule` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1NonResourcePolicyRule.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the required json array is present if (jsonObj.get("nonResourceURLs") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); @@ -239,9 +236,9 @@ public void write(JsonWriter out, V1NonResourcePolicyRule value) throws IOExcept @Override public V1NonResourcePolicyRule read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -268,3 +265,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NonResourceRule.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NonResourceRule.java index 4c94023a15..6426572cdd 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NonResourceRule.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NonResourceRule.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -43,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -51,11 +51,11 @@ /** * NonResourceRule holds information that describes a rule for the non-resource */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1NonResourceRule { public static final String SERIALIZED_NAME_NON_RESOURCE_U_R_LS = "nonResourceURLs"; @SerializedName(SERIALIZED_NAME_NON_RESOURCE_U_R_LS) - private List nonResourceURLs; + private List nonResourceURLs = new ArrayList<>(); public static final String SERIALIZED_NAME_VERBS = "verbs"; @SerializedName(SERIALIZED_NAME_VERBS) @@ -65,7 +65,6 @@ public V1NonResourceRule() { } public V1NonResourceRule nonResourceURLs(List nonResourceURLs) { - this.nonResourceURLs = nonResourceURLs; return this; } @@ -87,14 +86,12 @@ public List getNonResourceURLs() { return nonResourceURLs; } - public void setNonResourceURLs(List nonResourceURLs) { this.nonResourceURLs = nonResourceURLs; } public V1NonResourceRule verbs(List verbs) { - this.verbs = verbs; return this; } @@ -116,7 +113,6 @@ public List getVerbs() { return verbs; } - public void setVerbs(List verbs) { this.verbs = verbs; } @@ -178,34 +174,35 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1NonResourceRule + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1NonResourceRule */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1NonResourceRule.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1NonResourceRule.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1NonResourceRule is not found in the empty JSON string", V1NonResourceRule.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1NonResourceRule.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1NonResourceRule` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1NonResourceRule` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1NonResourceRule.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the optional json data is an array if present - if (jsonObj.get("nonResourceURLs") != null && !jsonObj.get("nonResourceURLs").isJsonArray()) { + if (jsonObj.get("nonResourceURLs") != null && !jsonObj.get("nonResourceURLs").isJsonNull() && !jsonObj.get("nonResourceURLs").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `nonResourceURLs` to be an array in the JSON string but got `%s`", jsonObj.get("nonResourceURLs").toString())); } // ensure the required json array is present @@ -236,9 +233,9 @@ public void write(JsonWriter out, V1NonResourceRule value) throws IOException { @Override public V1NonResourceRule read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -265,3 +262,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ObjectFieldSelector.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ObjectFieldSelector.java index a7089b8838..035ca616f2 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ObjectFieldSelector.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ObjectFieldSelector.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * ObjectFieldSelector selects an APIVersioned field of an object. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ObjectFieldSelector { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -63,7 +63,6 @@ public V1ObjectFieldSelector() { } public V1ObjectFieldSelector apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -77,14 +76,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1ObjectFieldSelector fieldPath(String fieldPath) { - this.fieldPath = fieldPath; return this; } @@ -98,7 +95,6 @@ public String getFieldPath() { return fieldPath; } - public void setFieldPath(String fieldPath) { this.fieldPath = fieldPath; } @@ -160,32 +156,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ObjectFieldSelector + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ObjectFieldSelector */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ObjectFieldSelector.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ObjectFieldSelector.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ObjectFieldSelector is not found in the empty JSON string", V1ObjectFieldSelector.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ObjectFieldSelector.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ObjectFieldSelector` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ObjectFieldSelector` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1ObjectFieldSelector.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -214,9 +211,9 @@ public void write(JsonWriter out, V1ObjectFieldSelector value) throws IOExceptio @Override public V1ObjectFieldSelector read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -243,3 +240,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ObjectMeta.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ObjectMeta.java index d7d58be20e..5bae1f3a4c 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ObjectMeta.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ObjectMeta.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -24,6 +24,7 @@ import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; +import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -48,7 +49,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -56,7 +56,7 @@ /** * ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ObjectMeta { public static final String SERIALIZED_NAME_ANNOTATIONS = "annotations"; @SerializedName(SERIALIZED_NAME_ANNOTATIONS) @@ -76,7 +76,7 @@ public class V1ObjectMeta { public static final String SERIALIZED_NAME_FINALIZERS = "finalizers"; @SerializedName(SERIALIZED_NAME_FINALIZERS) - private List finalizers; + private List finalizers = new ArrayList<>(); public static final String SERIALIZED_NAME_GENERATE_NAME = "generateName"; @SerializedName(SERIALIZED_NAME_GENERATE_NAME) @@ -92,7 +92,7 @@ public class V1ObjectMeta { public static final String SERIALIZED_NAME_MANAGED_FIELDS = "managedFields"; @SerializedName(SERIALIZED_NAME_MANAGED_FIELDS) - private List managedFields; + private List managedFields = new ArrayList<>(); public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) @@ -104,7 +104,7 @@ public class V1ObjectMeta { public static final String SERIALIZED_NAME_OWNER_REFERENCES = "ownerReferences"; @SerializedName(SERIALIZED_NAME_OWNER_REFERENCES) - private List ownerReferences; + private List ownerReferences = new ArrayList<>(); public static final String SERIALIZED_NAME_RESOURCE_VERSION = "resourceVersion"; @SerializedName(SERIALIZED_NAME_RESOURCE_VERSION) @@ -122,7 +122,6 @@ public V1ObjectMeta() { } public V1ObjectMeta annotations(Map annotations) { - this.annotations = annotations; return this; } @@ -144,14 +143,12 @@ public Map getAnnotations() { return annotations; } - public void setAnnotations(Map annotations) { this.annotations = annotations; } public V1ObjectMeta creationTimestamp(OffsetDateTime creationTimestamp) { - this.creationTimestamp = creationTimestamp; return this; } @@ -165,14 +162,12 @@ public OffsetDateTime getCreationTimestamp() { return creationTimestamp; } - public void setCreationTimestamp(OffsetDateTime creationTimestamp) { this.creationTimestamp = creationTimestamp; } public V1ObjectMeta deletionGracePeriodSeconds(Long deletionGracePeriodSeconds) { - this.deletionGracePeriodSeconds = deletionGracePeriodSeconds; return this; } @@ -186,14 +181,12 @@ public Long getDeletionGracePeriodSeconds() { return deletionGracePeriodSeconds; } - public void setDeletionGracePeriodSeconds(Long deletionGracePeriodSeconds) { this.deletionGracePeriodSeconds = deletionGracePeriodSeconds; } public V1ObjectMeta deletionTimestamp(OffsetDateTime deletionTimestamp) { - this.deletionTimestamp = deletionTimestamp; return this; } @@ -207,14 +200,12 @@ public OffsetDateTime getDeletionTimestamp() { return deletionTimestamp; } - public void setDeletionTimestamp(OffsetDateTime deletionTimestamp) { this.deletionTimestamp = deletionTimestamp; } public V1ObjectMeta finalizers(List finalizers) { - this.finalizers = finalizers; return this; } @@ -236,14 +227,12 @@ public List getFinalizers() { return finalizers; } - public void setFinalizers(List finalizers) { this.finalizers = finalizers; } public V1ObjectMeta generateName(String generateName) { - this.generateName = generateName; return this; } @@ -257,14 +246,12 @@ public String getGenerateName() { return generateName; } - public void setGenerateName(String generateName) { this.generateName = generateName; } public V1ObjectMeta generation(Long generation) { - this.generation = generation; return this; } @@ -278,14 +265,12 @@ public Long getGeneration() { return generation; } - public void setGeneration(Long generation) { this.generation = generation; } public V1ObjectMeta labels(Map labels) { - this.labels = labels; return this; } @@ -307,14 +292,12 @@ public Map getLabels() { return labels; } - public void setLabels(Map labels) { this.labels = labels; } public V1ObjectMeta managedFields(List managedFields) { - this.managedFields = managedFields; return this; } @@ -336,14 +319,12 @@ public List getManagedFields() { return managedFields; } - public void setManagedFields(List managedFields) { this.managedFields = managedFields; } public V1ObjectMeta name(String name) { - this.name = name; return this; } @@ -357,14 +338,12 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } public V1ObjectMeta namespace(String namespace) { - this.namespace = namespace; return this; } @@ -378,14 +357,12 @@ public String getNamespace() { return namespace; } - public void setNamespace(String namespace) { this.namespace = namespace; } public V1ObjectMeta ownerReferences(List ownerReferences) { - this.ownerReferences = ownerReferences; return this; } @@ -407,14 +384,12 @@ public List getOwnerReferences() { return ownerReferences; } - public void setOwnerReferences(List ownerReferences) { this.ownerReferences = ownerReferences; } public V1ObjectMeta resourceVersion(String resourceVersion) { - this.resourceVersion = resourceVersion; return this; } @@ -428,14 +403,12 @@ public String getResourceVersion() { return resourceVersion; } - public void setResourceVersion(String resourceVersion) { this.resourceVersion = resourceVersion; } public V1ObjectMeta selfLink(String selfLink) { - this.selfLink = selfLink; return this; } @@ -449,14 +422,12 @@ public String getSelfLink() { return selfLink; } - public void setSelfLink(String selfLink) { this.selfLink = selfLink; } public V1ObjectMeta uid(String uid) { - this.uid = uid; return this; } @@ -470,7 +441,6 @@ public String getUid() { return uid; } - public void setUid(String uid) { this.uid = uid; } @@ -570,27 +540,28 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ObjectMeta + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ObjectMeta */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ObjectMeta.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ObjectMeta.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ObjectMeta is not found in the empty JSON string", V1ObjectMeta.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ObjectMeta.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ObjectMeta` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ObjectMeta` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the optional json data is an array if present - if (jsonObj.get("finalizers") != null && !jsonObj.get("finalizers").isJsonArray()) { + if (jsonObj.get("finalizers") != null && !jsonObj.get("finalizers").isJsonNull() && !jsonObj.get("finalizers").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `finalizers` to be an array in the JSON string but got `%s`", jsonObj.get("finalizers").toString())); } if ((jsonObj.get("generateName") != null && !jsonObj.get("generateName").isJsonNull()) && !jsonObj.get("generateName").isJsonPrimitive()) { @@ -606,7 +577,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `managedFields` (array) for (int i = 0; i < jsonArraymanagedFields.size(); i++) { - V1ManagedFieldsEntry.validateJsonObject(jsonArraymanagedFields.get(i).getAsJsonObject()); + V1ManagedFieldsEntry.validateJsonElement(jsonArraymanagedFields.get(i)); }; } } @@ -626,7 +597,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `ownerReferences` (array) for (int i = 0; i < jsonArrayownerReferences.size(); i++) { - V1OwnerReference.validateJsonObject(jsonArrayownerReferences.get(i).getAsJsonObject()); + V1OwnerReference.validateJsonElement(jsonArrayownerReferences.get(i)); }; } } @@ -661,9 +632,9 @@ public void write(JsonWriter out, V1ObjectMeta value) throws IOException { @Override public V1ObjectMeta read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -690,3 +661,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ObjectReference.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ObjectReference.java index 11a4244673..0a5825d602 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ObjectReference.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ObjectReference.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * ObjectReference contains enough information to let you inspect or modify the referred object. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ObjectReference { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -83,7 +83,6 @@ public V1ObjectReference() { } public V1ObjectReference apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -97,14 +96,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1ObjectReference fieldPath(String fieldPath) { - this.fieldPath = fieldPath; return this; } @@ -118,14 +115,12 @@ public String getFieldPath() { return fieldPath; } - public void setFieldPath(String fieldPath) { this.fieldPath = fieldPath; } public V1ObjectReference kind(String kind) { - this.kind = kind; return this; } @@ -139,14 +134,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1ObjectReference name(String name) { - this.name = name; return this; } @@ -160,14 +153,12 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } public V1ObjectReference namespace(String namespace) { - this.namespace = namespace; return this; } @@ -181,14 +172,12 @@ public String getNamespace() { return namespace; } - public void setNamespace(String namespace) { this.namespace = namespace; } public V1ObjectReference resourceVersion(String resourceVersion) { - this.resourceVersion = resourceVersion; return this; } @@ -202,14 +191,12 @@ public String getResourceVersion() { return resourceVersion; } - public void setResourceVersion(String resourceVersion) { this.resourceVersion = resourceVersion; } public V1ObjectReference uid(String uid) { - this.uid = uid; return this; } @@ -223,7 +210,6 @@ public String getUid() { return uid; } - public void setUid(String uid) { this.uid = uid; } @@ -299,25 +285,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ObjectReference + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ObjectReference */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ObjectReference.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ObjectReference.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ObjectReference is not found in the empty JSON string", V1ObjectReference.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ObjectReference.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ObjectReference` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ObjectReference` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -361,9 +348,9 @@ public void write(JsonWriter out, V1ObjectReference value) throws IOException { @Override public V1ObjectReference read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -390,3 +377,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Overhead.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Overhead.java index a2fbbc8513..613cd95b31 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Overhead.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Overhead.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.custom.Quantity; import java.io.IOException; +import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * Overhead structure represents the resource overhead associated with running a pod. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1Overhead { public static final String SERIALIZED_NAME_POD_FIXED = "podFixed"; @SerializedName(SERIALIZED_NAME_POD_FIXED) @@ -62,7 +62,6 @@ public V1Overhead() { } public V1Overhead podFixed(Map podFixed) { - this.podFixed = podFixed; return this; } @@ -84,7 +83,6 @@ public Map getPodFixed() { return podFixed; } - public void setPodFixed(Map podFixed) { this.podFixed = podFixed; } @@ -142,25 +140,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1Overhead + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1Overhead */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1Overhead.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1Overhead.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1Overhead is not found in the empty JSON string", V1Overhead.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1Overhead.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1Overhead` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1Overhead` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -183,9 +182,9 @@ public void write(JsonWriter out, V1Overhead value) throws IOException { @Override public V1Overhead read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -212,3 +211,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1OwnerReference.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1OwnerReference.java index eefc1bb2af..f5652c044c 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1OwnerReference.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1OwnerReference.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * OwnerReference contains enough information to let you identify an owning object. An owning object must be in the same namespace as the dependent, or be cluster-scoped, so there is no namespace field. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1OwnerReference { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -79,7 +79,6 @@ public V1OwnerReference() { } public V1OwnerReference apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -93,14 +92,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1OwnerReference blockOwnerDeletion(Boolean blockOwnerDeletion) { - this.blockOwnerDeletion = blockOwnerDeletion; return this; } @@ -114,14 +111,12 @@ public Boolean getBlockOwnerDeletion() { return blockOwnerDeletion; } - public void setBlockOwnerDeletion(Boolean blockOwnerDeletion) { this.blockOwnerDeletion = blockOwnerDeletion; } public V1OwnerReference controller(Boolean controller) { - this.controller = controller; return this; } @@ -135,14 +130,12 @@ public Boolean getController() { return controller; } - public void setController(Boolean controller) { this.controller = controller; } public V1OwnerReference kind(String kind) { - this.kind = kind; return this; } @@ -156,14 +149,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1OwnerReference name(String name) { - this.name = name; return this; } @@ -177,14 +168,12 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } public V1OwnerReference uid(String uid) { - this.uid = uid; return this; } @@ -198,7 +187,6 @@ public String getUid() { return uid; } - public void setUid(String uid) { this.uid = uid; } @@ -275,32 +263,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1OwnerReference + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1OwnerReference */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1OwnerReference.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1OwnerReference.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1OwnerReference is not found in the empty JSON string", V1OwnerReference.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1OwnerReference.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1OwnerReference` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1OwnerReference` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1OwnerReference.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -335,9 +324,9 @@ public void write(JsonWriter out, V1OwnerReference value) throws IOException { @Override public V1OwnerReference read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -364,3 +353,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ParamKind.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ParamKind.java index 11374de296..0f7e46518c 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ParamKind.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ParamKind.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * ParamKind is a tuple of Group Kind and Version. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ParamKind { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -63,7 +63,6 @@ public V1ParamKind() { } public V1ParamKind apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -77,14 +76,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1ParamKind kind(String kind) { - this.kind = kind; return this; } @@ -98,7 +95,6 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } @@ -159,25 +155,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ParamKind + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ParamKind */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ParamKind.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ParamKind.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ParamKind is not found in the empty JSON string", V1ParamKind.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ParamKind.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ParamKind` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ParamKind` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -206,9 +203,9 @@ public void write(JsonWriter out, V1ParamKind value) throws IOException { @Override public V1ParamKind read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -235,3 +232,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ParamRef.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ParamRef.java index 04515164c8..7e1a560508 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ParamRef.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ParamRef.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.openapi.models.V1LabelSelector; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * ParamRef describes how to locate the params to be used as input to expressions of rules applied by a policy binding. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ParamRef { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) @@ -72,7 +72,6 @@ public V1ParamRef() { } public V1ParamRef name(String name) { - this.name = name; return this; } @@ -86,14 +85,12 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } public V1ParamRef namespace(String namespace) { - this.namespace = namespace; return this; } @@ -107,14 +104,12 @@ public String getNamespace() { return namespace; } - public void setNamespace(String namespace) { this.namespace = namespace; } public V1ParamRef parameterNotFoundAction(String parameterNotFoundAction) { - this.parameterNotFoundAction = parameterNotFoundAction; return this; } @@ -128,14 +123,12 @@ public String getParameterNotFoundAction() { return parameterNotFoundAction; } - public void setParameterNotFoundAction(String parameterNotFoundAction) { this.parameterNotFoundAction = parameterNotFoundAction; } public V1ParamRef selector(V1LabelSelector selector) { - this.selector = selector; return this; } @@ -149,7 +142,6 @@ public V1LabelSelector getSelector() { return selector; } - public void setSelector(V1LabelSelector selector) { this.selector = selector; } @@ -216,25 +208,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ParamRef + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ParamRef */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ParamRef.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ParamRef.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ParamRef is not found in the empty JSON string", V1ParamRef.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ParamRef.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ParamRef` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ParamRef` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } @@ -246,7 +239,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `selector` if (jsonObj.get("selector") != null && !jsonObj.get("selector").isJsonNull()) { - V1LabelSelector.validateJsonObject(jsonObj.getAsJsonObject("selector")); + V1LabelSelector.validateJsonElement(jsonObj.get("selector")); } } @@ -270,9 +263,9 @@ public void write(JsonWriter out, V1ParamRef value) throws IOException { @Override public V1ParamRef read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -299,3 +292,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolume.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolume.java index d66165c3d7..e56b75577b 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolume.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolume.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1PersistentVolumeSpec; import io.kubernetes.client.openapi.models.V1PersistentVolumeStatus; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * PersistentVolume (PV) is a storage resource provisioned by an administrator. It is analogous to a node. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1PersistentVolume implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -78,7 +78,6 @@ public V1PersistentVolume() { } public V1PersistentVolume apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -92,14 +91,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1PersistentVolume kind(String kind) { - this.kind = kind; return this; } @@ -113,14 +110,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1PersistentVolume metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -134,14 +129,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V1PersistentVolume spec(V1PersistentVolumeSpec spec) { - this.spec = spec; return this; } @@ -155,14 +148,12 @@ public V1PersistentVolumeSpec getSpec() { return spec; } - public void setSpec(V1PersistentVolumeSpec spec) { this.spec = spec; } public V1PersistentVolume status(V1PersistentVolumeStatus status) { - this.status = status; return this; } @@ -176,7 +167,6 @@ public V1PersistentVolumeStatus getStatus() { return status; } - public void setStatus(V1PersistentVolumeStatus status) { this.status = status; } @@ -246,25 +236,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1PersistentVolume + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1PersistentVolume */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1PersistentVolume.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1PersistentVolume.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1PersistentVolume is not found in the empty JSON string", V1PersistentVolume.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1PersistentVolume.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PersistentVolume` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PersistentVolume` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -273,15 +264,15 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } // validate the optional field `spec` if (jsonObj.get("spec") != null && !jsonObj.get("spec").isJsonNull()) { - V1PersistentVolumeSpec.validateJsonObject(jsonObj.getAsJsonObject("spec")); + V1PersistentVolumeSpec.validateJsonElement(jsonObj.get("spec")); } // validate the optional field `status` if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { - V1PersistentVolumeStatus.validateJsonObject(jsonObj.getAsJsonObject("status")); + V1PersistentVolumeStatus.validateJsonElement(jsonObj.get("status")); } } @@ -305,9 +296,9 @@ public void write(JsonWriter out, V1PersistentVolume value) throws IOException { @Override public V1PersistentVolume read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -334,3 +325,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaim.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaim.java index 6bacd46259..1eef95bd18 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaim.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaim.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1PersistentVolumeClaimSpec; import io.kubernetes.client.openapi.models.V1PersistentVolumeClaimStatus; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * PersistentVolumeClaim is a user's request for and claim to a persistent volume */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1PersistentVolumeClaim implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -78,7 +78,6 @@ public V1PersistentVolumeClaim() { } public V1PersistentVolumeClaim apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -92,14 +91,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1PersistentVolumeClaim kind(String kind) { - this.kind = kind; return this; } @@ -113,14 +110,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1PersistentVolumeClaim metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -134,14 +129,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V1PersistentVolumeClaim spec(V1PersistentVolumeClaimSpec spec) { - this.spec = spec; return this; } @@ -155,14 +148,12 @@ public V1PersistentVolumeClaimSpec getSpec() { return spec; } - public void setSpec(V1PersistentVolumeClaimSpec spec) { this.spec = spec; } public V1PersistentVolumeClaim status(V1PersistentVolumeClaimStatus status) { - this.status = status; return this; } @@ -176,7 +167,6 @@ public V1PersistentVolumeClaimStatus getStatus() { return status; } - public void setStatus(V1PersistentVolumeClaimStatus status) { this.status = status; } @@ -246,25 +236,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1PersistentVolumeClaim + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1PersistentVolumeClaim */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1PersistentVolumeClaim.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1PersistentVolumeClaim.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1PersistentVolumeClaim is not found in the empty JSON string", V1PersistentVolumeClaim.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1PersistentVolumeClaim.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PersistentVolumeClaim` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PersistentVolumeClaim` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -273,15 +264,15 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } // validate the optional field `spec` if (jsonObj.get("spec") != null && !jsonObj.get("spec").isJsonNull()) { - V1PersistentVolumeClaimSpec.validateJsonObject(jsonObj.getAsJsonObject("spec")); + V1PersistentVolumeClaimSpec.validateJsonElement(jsonObj.get("spec")); } // validate the optional field `status` if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { - V1PersistentVolumeClaimStatus.validateJsonObject(jsonObj.getAsJsonObject("status")); + V1PersistentVolumeClaimStatus.validateJsonElement(jsonObj.get("status")); } } @@ -305,9 +296,9 @@ public void write(JsonWriter out, V1PersistentVolumeClaim value) throws IOExcept @Override public V1PersistentVolumeClaim read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -334,3 +325,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimCondition.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimCondition.java index d218168f6e..af74b8e392 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimCondition.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimCondition.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * PersistentVolumeClaimCondition contains details about state of pvc */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1PersistentVolumeClaimCondition { public static final String SERIALIZED_NAME_LAST_PROBE_TIME = "lastProbeTime"; @SerializedName(SERIALIZED_NAME_LAST_PROBE_TIME) @@ -80,7 +80,6 @@ public V1PersistentVolumeClaimCondition() { } public V1PersistentVolumeClaimCondition lastProbeTime(OffsetDateTime lastProbeTime) { - this.lastProbeTime = lastProbeTime; return this; } @@ -94,14 +93,12 @@ public OffsetDateTime getLastProbeTime() { return lastProbeTime; } - public void setLastProbeTime(OffsetDateTime lastProbeTime) { this.lastProbeTime = lastProbeTime; } public V1PersistentVolumeClaimCondition lastTransitionTime(OffsetDateTime lastTransitionTime) { - this.lastTransitionTime = lastTransitionTime; return this; } @@ -115,14 +112,12 @@ public OffsetDateTime getLastTransitionTime() { return lastTransitionTime; } - public void setLastTransitionTime(OffsetDateTime lastTransitionTime) { this.lastTransitionTime = lastTransitionTime; } public V1PersistentVolumeClaimCondition message(String message) { - this.message = message; return this; } @@ -136,14 +131,12 @@ public String getMessage() { return message; } - public void setMessage(String message) { this.message = message; } public V1PersistentVolumeClaimCondition reason(String reason) { - this.reason = reason; return this; } @@ -157,14 +150,12 @@ public String getReason() { return reason; } - public void setReason(String reason) { this.reason = reason; } public V1PersistentVolumeClaimCondition status(String status) { - this.status = status; return this; } @@ -178,14 +169,12 @@ public String getStatus() { return status; } - public void setStatus(String status) { this.status = status; } public V1PersistentVolumeClaimCondition type(String type) { - this.type = type; return this; } @@ -199,7 +188,6 @@ public String getType() { return type; } - public void setType(String type) { this.type = type; } @@ -274,32 +262,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1PersistentVolumeClaimCondition + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1PersistentVolumeClaimCondition */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1PersistentVolumeClaimCondition.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1PersistentVolumeClaimCondition.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1PersistentVolumeClaimCondition is not found in the empty JSON string", V1PersistentVolumeClaimCondition.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1PersistentVolumeClaimCondition.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PersistentVolumeClaimCondition` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PersistentVolumeClaimCondition` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1PersistentVolumeClaimCondition.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); } @@ -334,9 +323,9 @@ public void write(JsonWriter out, V1PersistentVolumeClaimCondition value) throws @Override public V1PersistentVolumeClaimCondition read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -363,3 +352,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimList.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimList.java index d8da1a92c7..b8bb33072d 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimList.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimList.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1PersistentVolumeClaim; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * PersistentVolumeClaimList is a list of PersistentVolumeClaim items. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1PersistentVolumeClaimList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -75,7 +75,6 @@ public V1PersistentVolumeClaimList() { } public V1PersistentVolumeClaimList apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -89,14 +88,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1PersistentVolumeClaimList items(List items) { - this.items = items; return this; } @@ -118,14 +115,12 @@ public List getItems() { return items; } - public void setItems(List items) { this.items = items; } public V1PersistentVolumeClaimList kind(String kind) { - this.kind = kind; return this; } @@ -139,14 +134,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1PersistentVolumeClaimList metadata(V1ListMeta metadata) { - this.metadata = metadata; return this; } @@ -160,7 +153,6 @@ public V1ListMeta getMetadata() { return metadata; } - public void setMetadata(V1ListMeta metadata) { this.metadata = metadata; } @@ -228,32 +220,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1PersistentVolumeClaimList + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1PersistentVolumeClaimList */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1PersistentVolumeClaimList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1PersistentVolumeClaimList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1PersistentVolumeClaimList is not found in the empty JSON string", V1PersistentVolumeClaimList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1PersistentVolumeClaimList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PersistentVolumeClaimList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PersistentVolumeClaimList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1PersistentVolumeClaimList.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -265,14 +258,14 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); // validate the required field `items` (array) for (int i = 0; i < jsonArrayitems.size(); i++) { - V1PersistentVolumeClaim.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject()); + V1PersistentVolumeClaim.validateJsonElement(jsonArrayitems.get(i)); }; if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ListMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ListMeta.validateJsonElement(jsonObj.get("metadata")); } } @@ -296,9 +289,9 @@ public void write(JsonWriter out, V1PersistentVolumeClaimList value) throws IOEx @Override public V1PersistentVolumeClaimList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -325,3 +318,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimSpec.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimSpec.java index f1463f88ed..37e25f6c9c 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimSpec.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimSpec.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -25,6 +25,7 @@ import io.kubernetes.client.openapi.models.V1VolumeResourceRequirements; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -47,7 +48,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -55,11 +55,11 @@ /** * PersistentVolumeClaimSpec describes the common attributes of storage devices and allows a Source for provider-specific attributes */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1PersistentVolumeClaimSpec { public static final String SERIALIZED_NAME_ACCESS_MODES = "accessModes"; @SerializedName(SERIALIZED_NAME_ACCESS_MODES) - private List accessModes; + private List accessModes = new ArrayList<>(); public static final String SERIALIZED_NAME_DATA_SOURCE = "dataSource"; @SerializedName(SERIALIZED_NAME_DATA_SOURCE) @@ -97,7 +97,6 @@ public V1PersistentVolumeClaimSpec() { } public V1PersistentVolumeClaimSpec accessModes(List accessModes) { - this.accessModes = accessModes; return this; } @@ -119,14 +118,12 @@ public List getAccessModes() { return accessModes; } - public void setAccessModes(List accessModes) { this.accessModes = accessModes; } public V1PersistentVolumeClaimSpec dataSource(V1TypedLocalObjectReference dataSource) { - this.dataSource = dataSource; return this; } @@ -140,14 +137,12 @@ public V1TypedLocalObjectReference getDataSource() { return dataSource; } - public void setDataSource(V1TypedLocalObjectReference dataSource) { this.dataSource = dataSource; } public V1PersistentVolumeClaimSpec dataSourceRef(V1TypedObjectReference dataSourceRef) { - this.dataSourceRef = dataSourceRef; return this; } @@ -161,14 +156,12 @@ public V1TypedObjectReference getDataSourceRef() { return dataSourceRef; } - public void setDataSourceRef(V1TypedObjectReference dataSourceRef) { this.dataSourceRef = dataSourceRef; } public V1PersistentVolumeClaimSpec resources(V1VolumeResourceRequirements resources) { - this.resources = resources; return this; } @@ -182,14 +175,12 @@ public V1VolumeResourceRequirements getResources() { return resources; } - public void setResources(V1VolumeResourceRequirements resources) { this.resources = resources; } public V1PersistentVolumeClaimSpec selector(V1LabelSelector selector) { - this.selector = selector; return this; } @@ -203,14 +194,12 @@ public V1LabelSelector getSelector() { return selector; } - public void setSelector(V1LabelSelector selector) { this.selector = selector; } public V1PersistentVolumeClaimSpec storageClassName(String storageClassName) { - this.storageClassName = storageClassName; return this; } @@ -224,14 +213,12 @@ public String getStorageClassName() { return storageClassName; } - public void setStorageClassName(String storageClassName) { this.storageClassName = storageClassName; } public V1PersistentVolumeClaimSpec volumeAttributesClassName(String volumeAttributesClassName) { - this.volumeAttributesClassName = volumeAttributesClassName; return this; } @@ -245,14 +232,12 @@ public String getVolumeAttributesClassName() { return volumeAttributesClassName; } - public void setVolumeAttributesClassName(String volumeAttributesClassName) { this.volumeAttributesClassName = volumeAttributesClassName; } public V1PersistentVolumeClaimSpec volumeMode(String volumeMode) { - this.volumeMode = volumeMode; return this; } @@ -266,14 +251,12 @@ public String getVolumeMode() { return volumeMode; } - public void setVolumeMode(String volumeMode) { this.volumeMode = volumeMode; } public V1PersistentVolumeClaimSpec volumeName(String volumeName) { - this.volumeName = volumeName; return this; } @@ -287,7 +270,6 @@ public String getVolumeName() { return volumeName; } - public void setVolumeName(String volumeName) { this.volumeName = volumeName; } @@ -369,44 +351,45 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1PersistentVolumeClaimSpec + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1PersistentVolumeClaimSpec */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1PersistentVolumeClaimSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1PersistentVolumeClaimSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1PersistentVolumeClaimSpec is not found in the empty JSON string", V1PersistentVolumeClaimSpec.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1PersistentVolumeClaimSpec.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PersistentVolumeClaimSpec` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PersistentVolumeClaimSpec` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the optional json data is an array if present - if (jsonObj.get("accessModes") != null && !jsonObj.get("accessModes").isJsonArray()) { + if (jsonObj.get("accessModes") != null && !jsonObj.get("accessModes").isJsonNull() && !jsonObj.get("accessModes").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `accessModes` to be an array in the JSON string but got `%s`", jsonObj.get("accessModes").toString())); } // validate the optional field `dataSource` if (jsonObj.get("dataSource") != null && !jsonObj.get("dataSource").isJsonNull()) { - V1TypedLocalObjectReference.validateJsonObject(jsonObj.getAsJsonObject("dataSource")); + V1TypedLocalObjectReference.validateJsonElement(jsonObj.get("dataSource")); } // validate the optional field `dataSourceRef` if (jsonObj.get("dataSourceRef") != null && !jsonObj.get("dataSourceRef").isJsonNull()) { - V1TypedObjectReference.validateJsonObject(jsonObj.getAsJsonObject("dataSourceRef")); + V1TypedObjectReference.validateJsonElement(jsonObj.get("dataSourceRef")); } // validate the optional field `resources` if (jsonObj.get("resources") != null && !jsonObj.get("resources").isJsonNull()) { - V1VolumeResourceRequirements.validateJsonObject(jsonObj.getAsJsonObject("resources")); + V1VolumeResourceRequirements.validateJsonElement(jsonObj.get("resources")); } // validate the optional field `selector` if (jsonObj.get("selector") != null && !jsonObj.get("selector").isJsonNull()) { - V1LabelSelector.validateJsonObject(jsonObj.getAsJsonObject("selector")); + V1LabelSelector.validateJsonElement(jsonObj.get("selector")); } if ((jsonObj.get("storageClassName") != null && !jsonObj.get("storageClassName").isJsonNull()) && !jsonObj.get("storageClassName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `storageClassName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("storageClassName").toString())); @@ -442,9 +425,9 @@ public void write(JsonWriter out, V1PersistentVolumeClaimSpec value) throws IOEx @Override public V1PersistentVolumeClaimSpec read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -471,3 +454,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimStatus.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimStatus.java index 12915fa15b..ad9a3e10bd 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimStatus.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimStatus.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -24,6 +24,7 @@ import io.kubernetes.client.openapi.models.V1PersistentVolumeClaimCondition; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -48,7 +49,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -56,11 +56,11 @@ /** * PersistentVolumeClaimStatus is the current status of a persistent volume claim. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1PersistentVolumeClaimStatus { public static final String SERIALIZED_NAME_ACCESS_MODES = "accessModes"; @SerializedName(SERIALIZED_NAME_ACCESS_MODES) - private List accessModes; + private List accessModes = new ArrayList<>(); public static final String SERIALIZED_NAME_ALLOCATED_RESOURCE_STATUSES = "allocatedResourceStatuses"; @SerializedName(SERIALIZED_NAME_ALLOCATED_RESOURCE_STATUSES) @@ -76,7 +76,7 @@ public class V1PersistentVolumeClaimStatus { public static final String SERIALIZED_NAME_CONDITIONS = "conditions"; @SerializedName(SERIALIZED_NAME_CONDITIONS) - private List conditions; + private List conditions = new ArrayList<>(); public static final String SERIALIZED_NAME_CURRENT_VOLUME_ATTRIBUTES_CLASS_NAME = "currentVolumeAttributesClassName"; @SerializedName(SERIALIZED_NAME_CURRENT_VOLUME_ATTRIBUTES_CLASS_NAME) @@ -94,7 +94,6 @@ public V1PersistentVolumeClaimStatus() { } public V1PersistentVolumeClaimStatus accessModes(List accessModes) { - this.accessModes = accessModes; return this; } @@ -116,14 +115,12 @@ public List getAccessModes() { return accessModes; } - public void setAccessModes(List accessModes) { this.accessModes = accessModes; } public V1PersistentVolumeClaimStatus allocatedResourceStatuses(Map allocatedResourceStatuses) { - this.allocatedResourceStatuses = allocatedResourceStatuses; return this; } @@ -145,14 +142,12 @@ public Map getAllocatedResourceStatuses() { return allocatedResourceStatuses; } - public void setAllocatedResourceStatuses(Map allocatedResourceStatuses) { this.allocatedResourceStatuses = allocatedResourceStatuses; } public V1PersistentVolumeClaimStatus allocatedResources(Map allocatedResources) { - this.allocatedResources = allocatedResources; return this; } @@ -174,14 +169,12 @@ public Map getAllocatedResources() { return allocatedResources; } - public void setAllocatedResources(Map allocatedResources) { this.allocatedResources = allocatedResources; } public V1PersistentVolumeClaimStatus capacity(Map capacity) { - this.capacity = capacity; return this; } @@ -203,14 +196,12 @@ public Map getCapacity() { return capacity; } - public void setCapacity(Map capacity) { this.capacity = capacity; } public V1PersistentVolumeClaimStatus conditions(List conditions) { - this.conditions = conditions; return this; } @@ -232,14 +223,12 @@ public List getConditions() { return conditions; } - public void setConditions(List conditions) { this.conditions = conditions; } public V1PersistentVolumeClaimStatus currentVolumeAttributesClassName(String currentVolumeAttributesClassName) { - this.currentVolumeAttributesClassName = currentVolumeAttributesClassName; return this; } @@ -253,14 +242,12 @@ public String getCurrentVolumeAttributesClassName() { return currentVolumeAttributesClassName; } - public void setCurrentVolumeAttributesClassName(String currentVolumeAttributesClassName) { this.currentVolumeAttributesClassName = currentVolumeAttributesClassName; } public V1PersistentVolumeClaimStatus modifyVolumeStatus(V1ModifyVolumeStatus modifyVolumeStatus) { - this.modifyVolumeStatus = modifyVolumeStatus; return this; } @@ -274,14 +261,12 @@ public V1ModifyVolumeStatus getModifyVolumeStatus() { return modifyVolumeStatus; } - public void setModifyVolumeStatus(V1ModifyVolumeStatus modifyVolumeStatus) { this.modifyVolumeStatus = modifyVolumeStatus; } public V1PersistentVolumeClaimStatus phase(String phase) { - this.phase = phase; return this; } @@ -295,7 +280,6 @@ public String getPhase() { return phase; } - public void setPhase(String phase) { this.phase = phase; } @@ -374,27 +358,28 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1PersistentVolumeClaimStatus + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1PersistentVolumeClaimStatus */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1PersistentVolumeClaimStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1PersistentVolumeClaimStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1PersistentVolumeClaimStatus is not found in the empty JSON string", V1PersistentVolumeClaimStatus.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1PersistentVolumeClaimStatus.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PersistentVolumeClaimStatus` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PersistentVolumeClaimStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the optional json data is an array if present - if (jsonObj.get("accessModes") != null && !jsonObj.get("accessModes").isJsonArray()) { + if (jsonObj.get("accessModes") != null && !jsonObj.get("accessModes").isJsonNull() && !jsonObj.get("accessModes").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `accessModes` to be an array in the JSON string but got `%s`", jsonObj.get("accessModes").toString())); } if (jsonObj.get("conditions") != null && !jsonObj.get("conditions").isJsonNull()) { @@ -407,7 +392,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `conditions` (array) for (int i = 0; i < jsonArrayconditions.size(); i++) { - V1PersistentVolumeClaimCondition.validateJsonObject(jsonArrayconditions.get(i).getAsJsonObject()); + V1PersistentVolumeClaimCondition.validateJsonElement(jsonArrayconditions.get(i)); }; } } @@ -416,7 +401,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `modifyVolumeStatus` if (jsonObj.get("modifyVolumeStatus") != null && !jsonObj.get("modifyVolumeStatus").isJsonNull()) { - V1ModifyVolumeStatus.validateJsonObject(jsonObj.getAsJsonObject("modifyVolumeStatus")); + V1ModifyVolumeStatus.validateJsonElement(jsonObj.get("modifyVolumeStatus")); } if ((jsonObj.get("phase") != null && !jsonObj.get("phase").isJsonNull()) && !jsonObj.get("phase").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `phase` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phase").toString())); @@ -443,9 +428,9 @@ public void write(JsonWriter out, V1PersistentVolumeClaimStatus value) throws IO @Override public V1PersistentVolumeClaimStatus read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -472,3 +457,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimTemplate.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimTemplate.java index e228856efe..30134fba45 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimTemplate.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimTemplate.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1ObjectMeta; import io.kubernetes.client.openapi.models.V1PersistentVolumeClaimSpec; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -43,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -51,7 +51,7 @@ /** * PersistentVolumeClaimTemplate is used to produce PersistentVolumeClaim objects as part of an EphemeralVolumeSource. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1PersistentVolumeClaimTemplate { public static final String SERIALIZED_NAME_METADATA = "metadata"; @SerializedName(SERIALIZED_NAME_METADATA) @@ -65,7 +65,6 @@ public V1PersistentVolumeClaimTemplate() { } public V1PersistentVolumeClaimTemplate metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -79,14 +78,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V1PersistentVolumeClaimTemplate spec(V1PersistentVolumeClaimSpec spec) { - this.spec = spec; return this; } @@ -100,7 +97,6 @@ public V1PersistentVolumeClaimSpec getSpec() { return spec; } - public void setSpec(V1PersistentVolumeClaimSpec spec) { this.spec = spec; } @@ -162,38 +158,39 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1PersistentVolumeClaimTemplate + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1PersistentVolumeClaimTemplate */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1PersistentVolumeClaimTemplate.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1PersistentVolumeClaimTemplate.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1PersistentVolumeClaimTemplate is not found in the empty JSON string", V1PersistentVolumeClaimTemplate.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1PersistentVolumeClaimTemplate.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PersistentVolumeClaimTemplate` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PersistentVolumeClaimTemplate` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1PersistentVolumeClaimTemplate.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } // validate the required field `spec` - V1PersistentVolumeClaimSpec.validateJsonObject(jsonObj.getAsJsonObject("spec")); + V1PersistentVolumeClaimSpec.validateJsonElement(jsonObj.get("spec")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -216,9 +213,9 @@ public void write(JsonWriter out, V1PersistentVolumeClaimTemplate value) throws @Override public V1PersistentVolumeClaimTemplate read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -245,3 +242,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimVolumeSource.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimVolumeSource.java index b2c65ecfe4..36fa8b0259 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimVolumeSource.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimVolumeSource.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * 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). */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1PersistentVolumeClaimVolumeSource { public static final String SERIALIZED_NAME_CLAIM_NAME = "claimName"; @SerializedName(SERIALIZED_NAME_CLAIM_NAME) @@ -63,7 +63,6 @@ public V1PersistentVolumeClaimVolumeSource() { } public V1PersistentVolumeClaimVolumeSource claimName(String claimName) { - this.claimName = claimName; return this; } @@ -77,14 +76,12 @@ public String getClaimName() { return claimName; } - public void setClaimName(String claimName) { this.claimName = claimName; } public V1PersistentVolumeClaimVolumeSource readOnly(Boolean readOnly) { - this.readOnly = readOnly; return this; } @@ -98,7 +95,6 @@ public Boolean getReadOnly() { return readOnly; } - public void setReadOnly(Boolean readOnly) { this.readOnly = readOnly; } @@ -160,32 +156,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1PersistentVolumeClaimVolumeSource + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1PersistentVolumeClaimVolumeSource */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1PersistentVolumeClaimVolumeSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1PersistentVolumeClaimVolumeSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1PersistentVolumeClaimVolumeSource is not found in the empty JSON string", V1PersistentVolumeClaimVolumeSource.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1PersistentVolumeClaimVolumeSource.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PersistentVolumeClaimVolumeSource` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PersistentVolumeClaimVolumeSource` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1PersistentVolumeClaimVolumeSource.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("claimName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `claimName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("claimName").toString())); } @@ -211,9 +208,9 @@ public void write(JsonWriter out, V1PersistentVolumeClaimVolumeSource value) thr @Override public V1PersistentVolumeClaimVolumeSource read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -240,3 +237,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeList.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeList.java index 6e7527fbec..9b09d74ca6 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeList.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeList.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1PersistentVolume; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * PersistentVolumeList is a list of PersistentVolume items. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1PersistentVolumeList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -75,7 +75,6 @@ public V1PersistentVolumeList() { } public V1PersistentVolumeList apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -89,14 +88,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1PersistentVolumeList items(List items) { - this.items = items; return this; } @@ -118,14 +115,12 @@ public List getItems() { return items; } - public void setItems(List items) { this.items = items; } public V1PersistentVolumeList kind(String kind) { - this.kind = kind; return this; } @@ -139,14 +134,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1PersistentVolumeList metadata(V1ListMeta metadata) { - this.metadata = metadata; return this; } @@ -160,7 +153,6 @@ public V1ListMeta getMetadata() { return metadata; } - public void setMetadata(V1ListMeta metadata) { this.metadata = metadata; } @@ -228,32 +220,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1PersistentVolumeList + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1PersistentVolumeList */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1PersistentVolumeList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1PersistentVolumeList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1PersistentVolumeList is not found in the empty JSON string", V1PersistentVolumeList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1PersistentVolumeList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PersistentVolumeList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PersistentVolumeList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1PersistentVolumeList.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -265,14 +258,14 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); // validate the required field `items` (array) for (int i = 0; i < jsonArrayitems.size(); i++) { - V1PersistentVolume.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject()); + V1PersistentVolume.validateJsonElement(jsonArrayitems.get(i)); }; if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ListMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ListMeta.validateJsonElement(jsonObj.get("metadata")); } } @@ -296,9 +289,9 @@ public void write(JsonWriter out, V1PersistentVolumeList value) throws IOExcepti @Override public V1PersistentVolumeList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -325,3 +318,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeSpec.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeSpec.java index b5eea24a9b..3e84fe4154 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeSpec.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeSpec.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -46,6 +46,7 @@ import io.kubernetes.client.openapi.models.V1VsphereVirtualDiskVolumeSource; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -70,7 +71,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -78,11 +78,11 @@ /** * PersistentVolumeSpec is the specification of a persistent volume. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1PersistentVolumeSpec { public static final String SERIALIZED_NAME_ACCESS_MODES = "accessModes"; @SerializedName(SERIALIZED_NAME_ACCESS_MODES) - private List accessModes; + private List accessModes = new ArrayList<>(); public static final String SERIALIZED_NAME_AWS_ELASTIC_BLOCK_STORE = "awsElasticBlockStore"; @SerializedName(SERIALIZED_NAME_AWS_ELASTIC_BLOCK_STORE) @@ -150,7 +150,7 @@ public class V1PersistentVolumeSpec { public static final String SERIALIZED_NAME_MOUNT_OPTIONS = "mountOptions"; @SerializedName(SERIALIZED_NAME_MOUNT_OPTIONS) - private List mountOptions; + private List mountOptions = new ArrayList<>(); public static final String SERIALIZED_NAME_NFS = "nfs"; @SerializedName(SERIALIZED_NAME_NFS) @@ -208,7 +208,6 @@ public V1PersistentVolumeSpec() { } public V1PersistentVolumeSpec accessModes(List accessModes) { - this.accessModes = accessModes; return this; } @@ -230,14 +229,12 @@ public List getAccessModes() { return accessModes; } - public void setAccessModes(List accessModes) { this.accessModes = accessModes; } public V1PersistentVolumeSpec awsElasticBlockStore(V1AWSElasticBlockStoreVolumeSource awsElasticBlockStore) { - this.awsElasticBlockStore = awsElasticBlockStore; return this; } @@ -251,14 +248,12 @@ public V1AWSElasticBlockStoreVolumeSource getAwsElasticBlockStore() { return awsElasticBlockStore; } - public void setAwsElasticBlockStore(V1AWSElasticBlockStoreVolumeSource awsElasticBlockStore) { this.awsElasticBlockStore = awsElasticBlockStore; } public V1PersistentVolumeSpec azureDisk(V1AzureDiskVolumeSource azureDisk) { - this.azureDisk = azureDisk; return this; } @@ -272,14 +267,12 @@ public V1AzureDiskVolumeSource getAzureDisk() { return azureDisk; } - public void setAzureDisk(V1AzureDiskVolumeSource azureDisk) { this.azureDisk = azureDisk; } public V1PersistentVolumeSpec azureFile(V1AzureFilePersistentVolumeSource azureFile) { - this.azureFile = azureFile; return this; } @@ -293,14 +286,12 @@ public V1AzureFilePersistentVolumeSource getAzureFile() { return azureFile; } - public void setAzureFile(V1AzureFilePersistentVolumeSource azureFile) { this.azureFile = azureFile; } public V1PersistentVolumeSpec capacity(Map capacity) { - this.capacity = capacity; return this; } @@ -322,14 +313,12 @@ public Map getCapacity() { return capacity; } - public void setCapacity(Map capacity) { this.capacity = capacity; } public V1PersistentVolumeSpec cephfs(V1CephFSPersistentVolumeSource cephfs) { - this.cephfs = cephfs; return this; } @@ -343,14 +332,12 @@ public V1CephFSPersistentVolumeSource getCephfs() { return cephfs; } - public void setCephfs(V1CephFSPersistentVolumeSource cephfs) { this.cephfs = cephfs; } public V1PersistentVolumeSpec cinder(V1CinderPersistentVolumeSource cinder) { - this.cinder = cinder; return this; } @@ -364,14 +351,12 @@ public V1CinderPersistentVolumeSource getCinder() { return cinder; } - public void setCinder(V1CinderPersistentVolumeSource cinder) { this.cinder = cinder; } public V1PersistentVolumeSpec claimRef(V1ObjectReference claimRef) { - this.claimRef = claimRef; return this; } @@ -385,14 +370,12 @@ public V1ObjectReference getClaimRef() { return claimRef; } - public void setClaimRef(V1ObjectReference claimRef) { this.claimRef = claimRef; } public V1PersistentVolumeSpec csi(V1CSIPersistentVolumeSource csi) { - this.csi = csi; return this; } @@ -406,14 +389,12 @@ public V1CSIPersistentVolumeSource getCsi() { return csi; } - public void setCsi(V1CSIPersistentVolumeSource csi) { this.csi = csi; } public V1PersistentVolumeSpec fc(V1FCVolumeSource fc) { - this.fc = fc; return this; } @@ -427,14 +408,12 @@ public V1FCVolumeSource getFc() { return fc; } - public void setFc(V1FCVolumeSource fc) { this.fc = fc; } public V1PersistentVolumeSpec flexVolume(V1FlexPersistentVolumeSource flexVolume) { - this.flexVolume = flexVolume; return this; } @@ -448,14 +427,12 @@ public V1FlexPersistentVolumeSource getFlexVolume() { return flexVolume; } - public void setFlexVolume(V1FlexPersistentVolumeSource flexVolume) { this.flexVolume = flexVolume; } public V1PersistentVolumeSpec flocker(V1FlockerVolumeSource flocker) { - this.flocker = flocker; return this; } @@ -469,14 +446,12 @@ public V1FlockerVolumeSource getFlocker() { return flocker; } - public void setFlocker(V1FlockerVolumeSource flocker) { this.flocker = flocker; } public V1PersistentVolumeSpec gcePersistentDisk(V1GCEPersistentDiskVolumeSource gcePersistentDisk) { - this.gcePersistentDisk = gcePersistentDisk; return this; } @@ -490,14 +465,12 @@ public V1GCEPersistentDiskVolumeSource getGcePersistentDisk() { return gcePersistentDisk; } - public void setGcePersistentDisk(V1GCEPersistentDiskVolumeSource gcePersistentDisk) { this.gcePersistentDisk = gcePersistentDisk; } public V1PersistentVolumeSpec glusterfs(V1GlusterfsPersistentVolumeSource glusterfs) { - this.glusterfs = glusterfs; return this; } @@ -511,14 +484,12 @@ public V1GlusterfsPersistentVolumeSource getGlusterfs() { return glusterfs; } - public void setGlusterfs(V1GlusterfsPersistentVolumeSource glusterfs) { this.glusterfs = glusterfs; } public V1PersistentVolumeSpec hostPath(V1HostPathVolumeSource hostPath) { - this.hostPath = hostPath; return this; } @@ -532,14 +503,12 @@ public V1HostPathVolumeSource getHostPath() { return hostPath; } - public void setHostPath(V1HostPathVolumeSource hostPath) { this.hostPath = hostPath; } public V1PersistentVolumeSpec iscsi(V1ISCSIPersistentVolumeSource iscsi) { - this.iscsi = iscsi; return this; } @@ -553,14 +522,12 @@ public V1ISCSIPersistentVolumeSource getIscsi() { return iscsi; } - public void setIscsi(V1ISCSIPersistentVolumeSource iscsi) { this.iscsi = iscsi; } public V1PersistentVolumeSpec local(V1LocalVolumeSource local) { - this.local = local; return this; } @@ -574,14 +541,12 @@ public V1LocalVolumeSource getLocal() { return local; } - public void setLocal(V1LocalVolumeSource local) { this.local = local; } public V1PersistentVolumeSpec mountOptions(List mountOptions) { - this.mountOptions = mountOptions; return this; } @@ -603,14 +568,12 @@ public List getMountOptions() { return mountOptions; } - public void setMountOptions(List mountOptions) { this.mountOptions = mountOptions; } public V1PersistentVolumeSpec nfs(V1NFSVolumeSource nfs) { - this.nfs = nfs; return this; } @@ -624,14 +587,12 @@ public V1NFSVolumeSource getNfs() { return nfs; } - public void setNfs(V1NFSVolumeSource nfs) { this.nfs = nfs; } public V1PersistentVolumeSpec nodeAffinity(V1VolumeNodeAffinity nodeAffinity) { - this.nodeAffinity = nodeAffinity; return this; } @@ -645,14 +606,12 @@ public V1VolumeNodeAffinity getNodeAffinity() { return nodeAffinity; } - public void setNodeAffinity(V1VolumeNodeAffinity nodeAffinity) { this.nodeAffinity = nodeAffinity; } public V1PersistentVolumeSpec persistentVolumeReclaimPolicy(String persistentVolumeReclaimPolicy) { - this.persistentVolumeReclaimPolicy = persistentVolumeReclaimPolicy; return this; } @@ -666,14 +625,12 @@ public String getPersistentVolumeReclaimPolicy() { return persistentVolumeReclaimPolicy; } - public void setPersistentVolumeReclaimPolicy(String persistentVolumeReclaimPolicy) { this.persistentVolumeReclaimPolicy = persistentVolumeReclaimPolicy; } public V1PersistentVolumeSpec photonPersistentDisk(V1PhotonPersistentDiskVolumeSource photonPersistentDisk) { - this.photonPersistentDisk = photonPersistentDisk; return this; } @@ -687,14 +644,12 @@ public V1PhotonPersistentDiskVolumeSource getPhotonPersistentDisk() { return photonPersistentDisk; } - public void setPhotonPersistentDisk(V1PhotonPersistentDiskVolumeSource photonPersistentDisk) { this.photonPersistentDisk = photonPersistentDisk; } public V1PersistentVolumeSpec portworxVolume(V1PortworxVolumeSource portworxVolume) { - this.portworxVolume = portworxVolume; return this; } @@ -708,14 +663,12 @@ public V1PortworxVolumeSource getPortworxVolume() { return portworxVolume; } - public void setPortworxVolume(V1PortworxVolumeSource portworxVolume) { this.portworxVolume = portworxVolume; } public V1PersistentVolumeSpec quobyte(V1QuobyteVolumeSource quobyte) { - this.quobyte = quobyte; return this; } @@ -729,14 +682,12 @@ public V1QuobyteVolumeSource getQuobyte() { return quobyte; } - public void setQuobyte(V1QuobyteVolumeSource quobyte) { this.quobyte = quobyte; } public V1PersistentVolumeSpec rbd(V1RBDPersistentVolumeSource rbd) { - this.rbd = rbd; return this; } @@ -750,14 +701,12 @@ public V1RBDPersistentVolumeSource getRbd() { return rbd; } - public void setRbd(V1RBDPersistentVolumeSource rbd) { this.rbd = rbd; } public V1PersistentVolumeSpec scaleIO(V1ScaleIOPersistentVolumeSource scaleIO) { - this.scaleIO = scaleIO; return this; } @@ -771,14 +720,12 @@ public V1ScaleIOPersistentVolumeSource getScaleIO() { return scaleIO; } - public void setScaleIO(V1ScaleIOPersistentVolumeSource scaleIO) { this.scaleIO = scaleIO; } public V1PersistentVolumeSpec storageClassName(String storageClassName) { - this.storageClassName = storageClassName; return this; } @@ -792,14 +739,12 @@ public String getStorageClassName() { return storageClassName; } - public void setStorageClassName(String storageClassName) { this.storageClassName = storageClassName; } public V1PersistentVolumeSpec storageos(V1StorageOSPersistentVolumeSource storageos) { - this.storageos = storageos; return this; } @@ -813,14 +758,12 @@ public V1StorageOSPersistentVolumeSource getStorageos() { return storageos; } - public void setStorageos(V1StorageOSPersistentVolumeSource storageos) { this.storageos = storageos; } public V1PersistentVolumeSpec volumeAttributesClassName(String volumeAttributesClassName) { - this.volumeAttributesClassName = volumeAttributesClassName; return this; } @@ -834,14 +777,12 @@ public String getVolumeAttributesClassName() { return volumeAttributesClassName; } - public void setVolumeAttributesClassName(String volumeAttributesClassName) { this.volumeAttributesClassName = volumeAttributesClassName; } public V1PersistentVolumeSpec volumeMode(String volumeMode) { - this.volumeMode = volumeMode; return this; } @@ -855,14 +796,12 @@ public String getVolumeMode() { return volumeMode; } - public void setVolumeMode(String volumeMode) { this.volumeMode = volumeMode; } public V1PersistentVolumeSpec vsphereVolume(V1VsphereVirtualDiskVolumeSource vsphereVolume) { - this.vsphereVolume = vsphereVolume; return this; } @@ -876,7 +815,6 @@ public V1VsphereVirtualDiskVolumeSource getVsphereVolume() { return vsphereVolume; } - public void setVsphereVolume(V1VsphereVirtualDiskVolumeSource vsphereVolume) { this.vsphereVolume = vsphereVolume; } @@ -1024,130 +962,131 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1PersistentVolumeSpec + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1PersistentVolumeSpec */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1PersistentVolumeSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1PersistentVolumeSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1PersistentVolumeSpec is not found in the empty JSON string", V1PersistentVolumeSpec.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1PersistentVolumeSpec.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PersistentVolumeSpec` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PersistentVolumeSpec` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the optional json data is an array if present - if (jsonObj.get("accessModes") != null && !jsonObj.get("accessModes").isJsonArray()) { + if (jsonObj.get("accessModes") != null && !jsonObj.get("accessModes").isJsonNull() && !jsonObj.get("accessModes").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `accessModes` to be an array in the JSON string but got `%s`", jsonObj.get("accessModes").toString())); } // validate the optional field `awsElasticBlockStore` if (jsonObj.get("awsElasticBlockStore") != null && !jsonObj.get("awsElasticBlockStore").isJsonNull()) { - V1AWSElasticBlockStoreVolumeSource.validateJsonObject(jsonObj.getAsJsonObject("awsElasticBlockStore")); + V1AWSElasticBlockStoreVolumeSource.validateJsonElement(jsonObj.get("awsElasticBlockStore")); } // validate the optional field `azureDisk` if (jsonObj.get("azureDisk") != null && !jsonObj.get("azureDisk").isJsonNull()) { - V1AzureDiskVolumeSource.validateJsonObject(jsonObj.getAsJsonObject("azureDisk")); + V1AzureDiskVolumeSource.validateJsonElement(jsonObj.get("azureDisk")); } // validate the optional field `azureFile` if (jsonObj.get("azureFile") != null && !jsonObj.get("azureFile").isJsonNull()) { - V1AzureFilePersistentVolumeSource.validateJsonObject(jsonObj.getAsJsonObject("azureFile")); + V1AzureFilePersistentVolumeSource.validateJsonElement(jsonObj.get("azureFile")); } // validate the optional field `cephfs` if (jsonObj.get("cephfs") != null && !jsonObj.get("cephfs").isJsonNull()) { - V1CephFSPersistentVolumeSource.validateJsonObject(jsonObj.getAsJsonObject("cephfs")); + V1CephFSPersistentVolumeSource.validateJsonElement(jsonObj.get("cephfs")); } // validate the optional field `cinder` if (jsonObj.get("cinder") != null && !jsonObj.get("cinder").isJsonNull()) { - V1CinderPersistentVolumeSource.validateJsonObject(jsonObj.getAsJsonObject("cinder")); + V1CinderPersistentVolumeSource.validateJsonElement(jsonObj.get("cinder")); } // validate the optional field `claimRef` if (jsonObj.get("claimRef") != null && !jsonObj.get("claimRef").isJsonNull()) { - V1ObjectReference.validateJsonObject(jsonObj.getAsJsonObject("claimRef")); + V1ObjectReference.validateJsonElement(jsonObj.get("claimRef")); } // validate the optional field `csi` if (jsonObj.get("csi") != null && !jsonObj.get("csi").isJsonNull()) { - V1CSIPersistentVolumeSource.validateJsonObject(jsonObj.getAsJsonObject("csi")); + V1CSIPersistentVolumeSource.validateJsonElement(jsonObj.get("csi")); } // validate the optional field `fc` if (jsonObj.get("fc") != null && !jsonObj.get("fc").isJsonNull()) { - V1FCVolumeSource.validateJsonObject(jsonObj.getAsJsonObject("fc")); + V1FCVolumeSource.validateJsonElement(jsonObj.get("fc")); } // validate the optional field `flexVolume` if (jsonObj.get("flexVolume") != null && !jsonObj.get("flexVolume").isJsonNull()) { - V1FlexPersistentVolumeSource.validateJsonObject(jsonObj.getAsJsonObject("flexVolume")); + V1FlexPersistentVolumeSource.validateJsonElement(jsonObj.get("flexVolume")); } // validate the optional field `flocker` if (jsonObj.get("flocker") != null && !jsonObj.get("flocker").isJsonNull()) { - V1FlockerVolumeSource.validateJsonObject(jsonObj.getAsJsonObject("flocker")); + V1FlockerVolumeSource.validateJsonElement(jsonObj.get("flocker")); } // validate the optional field `gcePersistentDisk` if (jsonObj.get("gcePersistentDisk") != null && !jsonObj.get("gcePersistentDisk").isJsonNull()) { - V1GCEPersistentDiskVolumeSource.validateJsonObject(jsonObj.getAsJsonObject("gcePersistentDisk")); + V1GCEPersistentDiskVolumeSource.validateJsonElement(jsonObj.get("gcePersistentDisk")); } // validate the optional field `glusterfs` if (jsonObj.get("glusterfs") != null && !jsonObj.get("glusterfs").isJsonNull()) { - V1GlusterfsPersistentVolumeSource.validateJsonObject(jsonObj.getAsJsonObject("glusterfs")); + V1GlusterfsPersistentVolumeSource.validateJsonElement(jsonObj.get("glusterfs")); } // validate the optional field `hostPath` if (jsonObj.get("hostPath") != null && !jsonObj.get("hostPath").isJsonNull()) { - V1HostPathVolumeSource.validateJsonObject(jsonObj.getAsJsonObject("hostPath")); + V1HostPathVolumeSource.validateJsonElement(jsonObj.get("hostPath")); } // validate the optional field `iscsi` if (jsonObj.get("iscsi") != null && !jsonObj.get("iscsi").isJsonNull()) { - V1ISCSIPersistentVolumeSource.validateJsonObject(jsonObj.getAsJsonObject("iscsi")); + V1ISCSIPersistentVolumeSource.validateJsonElement(jsonObj.get("iscsi")); } // validate the optional field `local` if (jsonObj.get("local") != null && !jsonObj.get("local").isJsonNull()) { - V1LocalVolumeSource.validateJsonObject(jsonObj.getAsJsonObject("local")); + V1LocalVolumeSource.validateJsonElement(jsonObj.get("local")); } // ensure the optional json data is an array if present - if (jsonObj.get("mountOptions") != null && !jsonObj.get("mountOptions").isJsonArray()) { + if (jsonObj.get("mountOptions") != null && !jsonObj.get("mountOptions").isJsonNull() && !jsonObj.get("mountOptions").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `mountOptions` to be an array in the JSON string but got `%s`", jsonObj.get("mountOptions").toString())); } // validate the optional field `nfs` if (jsonObj.get("nfs") != null && !jsonObj.get("nfs").isJsonNull()) { - V1NFSVolumeSource.validateJsonObject(jsonObj.getAsJsonObject("nfs")); + V1NFSVolumeSource.validateJsonElement(jsonObj.get("nfs")); } // validate the optional field `nodeAffinity` if (jsonObj.get("nodeAffinity") != null && !jsonObj.get("nodeAffinity").isJsonNull()) { - V1VolumeNodeAffinity.validateJsonObject(jsonObj.getAsJsonObject("nodeAffinity")); + V1VolumeNodeAffinity.validateJsonElement(jsonObj.get("nodeAffinity")); } if ((jsonObj.get("persistentVolumeReclaimPolicy") != null && !jsonObj.get("persistentVolumeReclaimPolicy").isJsonNull()) && !jsonObj.get("persistentVolumeReclaimPolicy").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `persistentVolumeReclaimPolicy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("persistentVolumeReclaimPolicy").toString())); } // validate the optional field `photonPersistentDisk` if (jsonObj.get("photonPersistentDisk") != null && !jsonObj.get("photonPersistentDisk").isJsonNull()) { - V1PhotonPersistentDiskVolumeSource.validateJsonObject(jsonObj.getAsJsonObject("photonPersistentDisk")); + V1PhotonPersistentDiskVolumeSource.validateJsonElement(jsonObj.get("photonPersistentDisk")); } // validate the optional field `portworxVolume` if (jsonObj.get("portworxVolume") != null && !jsonObj.get("portworxVolume").isJsonNull()) { - V1PortworxVolumeSource.validateJsonObject(jsonObj.getAsJsonObject("portworxVolume")); + V1PortworxVolumeSource.validateJsonElement(jsonObj.get("portworxVolume")); } // validate the optional field `quobyte` if (jsonObj.get("quobyte") != null && !jsonObj.get("quobyte").isJsonNull()) { - V1QuobyteVolumeSource.validateJsonObject(jsonObj.getAsJsonObject("quobyte")); + V1QuobyteVolumeSource.validateJsonElement(jsonObj.get("quobyte")); } // validate the optional field `rbd` if (jsonObj.get("rbd") != null && !jsonObj.get("rbd").isJsonNull()) { - V1RBDPersistentVolumeSource.validateJsonObject(jsonObj.getAsJsonObject("rbd")); + V1RBDPersistentVolumeSource.validateJsonElement(jsonObj.get("rbd")); } // validate the optional field `scaleIO` if (jsonObj.get("scaleIO") != null && !jsonObj.get("scaleIO").isJsonNull()) { - V1ScaleIOPersistentVolumeSource.validateJsonObject(jsonObj.getAsJsonObject("scaleIO")); + V1ScaleIOPersistentVolumeSource.validateJsonElement(jsonObj.get("scaleIO")); } if ((jsonObj.get("storageClassName") != null && !jsonObj.get("storageClassName").isJsonNull()) && !jsonObj.get("storageClassName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `storageClassName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("storageClassName").toString())); } // validate the optional field `storageos` if (jsonObj.get("storageos") != null && !jsonObj.get("storageos").isJsonNull()) { - V1StorageOSPersistentVolumeSource.validateJsonObject(jsonObj.getAsJsonObject("storageos")); + V1StorageOSPersistentVolumeSource.validateJsonElement(jsonObj.get("storageos")); } if ((jsonObj.get("volumeAttributesClassName") != null && !jsonObj.get("volumeAttributesClassName").isJsonNull()) && !jsonObj.get("volumeAttributesClassName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `volumeAttributesClassName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("volumeAttributesClassName").toString())); @@ -1157,7 +1096,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `vsphereVolume` if (jsonObj.get("vsphereVolume") != null && !jsonObj.get("vsphereVolume").isJsonNull()) { - V1VsphereVirtualDiskVolumeSource.validateJsonObject(jsonObj.getAsJsonObject("vsphereVolume")); + V1VsphereVirtualDiskVolumeSource.validateJsonElement(jsonObj.get("vsphereVolume")); } } @@ -1181,9 +1120,9 @@ public void write(JsonWriter out, V1PersistentVolumeSpec value) throws IOExcepti @Override public V1PersistentVolumeSpec read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -1210,3 +1149,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeStatus.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeStatus.java index d962d9905e..f118384921 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeStatus.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeStatus.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * PersistentVolumeStatus is the current status of a persistent volume. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1PersistentVolumeStatus { public static final String SERIALIZED_NAME_LAST_PHASE_TRANSITION_TIME = "lastPhaseTransitionTime"; @SerializedName(SERIALIZED_NAME_LAST_PHASE_TRANSITION_TIME) @@ -72,7 +72,6 @@ public V1PersistentVolumeStatus() { } public V1PersistentVolumeStatus lastPhaseTransitionTime(OffsetDateTime lastPhaseTransitionTime) { - this.lastPhaseTransitionTime = lastPhaseTransitionTime; return this; } @@ -86,14 +85,12 @@ public OffsetDateTime getLastPhaseTransitionTime() { return lastPhaseTransitionTime; } - public void setLastPhaseTransitionTime(OffsetDateTime lastPhaseTransitionTime) { this.lastPhaseTransitionTime = lastPhaseTransitionTime; } public V1PersistentVolumeStatus message(String message) { - this.message = message; return this; } @@ -107,14 +104,12 @@ public String getMessage() { return message; } - public void setMessage(String message) { this.message = message; } public V1PersistentVolumeStatus phase(String phase) { - this.phase = phase; return this; } @@ -128,14 +123,12 @@ public String getPhase() { return phase; } - public void setPhase(String phase) { this.phase = phase; } public V1PersistentVolumeStatus reason(String reason) { - this.reason = reason; return this; } @@ -149,7 +142,6 @@ public String getReason() { return reason; } - public void setReason(String reason) { this.reason = reason; } @@ -216,25 +208,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1PersistentVolumeStatus + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1PersistentVolumeStatus */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1PersistentVolumeStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1PersistentVolumeStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1PersistentVolumeStatus is not found in the empty JSON string", V1PersistentVolumeStatus.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1PersistentVolumeStatus.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PersistentVolumeStatus` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PersistentVolumeStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); } @@ -266,9 +259,9 @@ public void write(JsonWriter out, V1PersistentVolumeStatus value) throws IOExcep @Override public V1PersistentVolumeStatus read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -295,3 +288,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PhotonPersistentDiskVolumeSource.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PhotonPersistentDiskVolumeSource.java index 73b0a7d833..5ce21db036 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PhotonPersistentDiskVolumeSource.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PhotonPersistentDiskVolumeSource.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * Represents a Photon Controller persistent disk resource. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1PhotonPersistentDiskVolumeSource { public static final String SERIALIZED_NAME_FS_TYPE = "fsType"; @SerializedName(SERIALIZED_NAME_FS_TYPE) @@ -63,7 +63,6 @@ public V1PhotonPersistentDiskVolumeSource() { } public V1PhotonPersistentDiskVolumeSource fsType(String fsType) { - this.fsType = fsType; return this; } @@ -77,14 +76,12 @@ public String getFsType() { return fsType; } - public void setFsType(String fsType) { this.fsType = fsType; } public V1PhotonPersistentDiskVolumeSource pdID(String pdID) { - this.pdID = pdID; return this; } @@ -98,7 +95,6 @@ public String getPdID() { return pdID; } - public void setPdID(String pdID) { this.pdID = pdID; } @@ -160,32 +156,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1PhotonPersistentDiskVolumeSource + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1PhotonPersistentDiskVolumeSource */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1PhotonPersistentDiskVolumeSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1PhotonPersistentDiskVolumeSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1PhotonPersistentDiskVolumeSource is not found in the empty JSON string", V1PhotonPersistentDiskVolumeSource.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1PhotonPersistentDiskVolumeSource.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PhotonPersistentDiskVolumeSource` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PhotonPersistentDiskVolumeSource` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1PhotonPersistentDiskVolumeSource.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("fsType") != null && !jsonObj.get("fsType").isJsonNull()) && !jsonObj.get("fsType").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `fsType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fsType").toString())); } @@ -214,9 +211,9 @@ public void write(JsonWriter out, V1PhotonPersistentDiskVolumeSource value) thro @Override public V1PhotonPersistentDiskVolumeSource read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -243,3 +240,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Pod.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Pod.java index 96a4e7d43b..6e56cd1be4 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Pod.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Pod.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1PodSpec; import io.kubernetes.client.openapi.models.V1PodStatus; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * Pod is a collection of containers that can run on a host. This resource is created by clients and scheduled onto hosts. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1Pod implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -78,7 +78,6 @@ public V1Pod() { } public V1Pod apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -92,14 +91,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1Pod kind(String kind) { - this.kind = kind; return this; } @@ -113,14 +110,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1Pod metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -134,14 +129,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V1Pod spec(V1PodSpec spec) { - this.spec = spec; return this; } @@ -155,14 +148,12 @@ public V1PodSpec getSpec() { return spec; } - public void setSpec(V1PodSpec spec) { this.spec = spec; } public V1Pod status(V1PodStatus status) { - this.status = status; return this; } @@ -176,7 +167,6 @@ public V1PodStatus getStatus() { return status; } - public void setStatus(V1PodStatus status) { this.status = status; } @@ -246,25 +236,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1Pod + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1Pod */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1Pod.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1Pod.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1Pod is not found in the empty JSON string", V1Pod.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1Pod.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1Pod` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1Pod` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -273,15 +264,15 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } // validate the optional field `spec` if (jsonObj.get("spec") != null && !jsonObj.get("spec").isJsonNull()) { - V1PodSpec.validateJsonObject(jsonObj.getAsJsonObject("spec")); + V1PodSpec.validateJsonElement(jsonObj.get("spec")); } // validate the optional field `status` if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { - V1PodStatus.validateJsonObject(jsonObj.getAsJsonObject("status")); + V1PodStatus.validateJsonElement(jsonObj.get("status")); } } @@ -305,9 +296,9 @@ public void write(JsonWriter out, V1Pod value) throws IOException { @Override public V1Pod read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -334,3 +325,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodAffinity.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodAffinity.java index 5914c5ead6..ea3b4c6fdd 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodAffinity.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodAffinity.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1WeightedPodAffinityTerm; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,21 +53,20 @@ /** * Pod affinity is a group of inter pod affinity scheduling rules. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1PodAffinity { public static final String SERIALIZED_NAME_PREFERRED_DURING_SCHEDULING_IGNORED_DURING_EXECUTION = "preferredDuringSchedulingIgnoredDuringExecution"; @SerializedName(SERIALIZED_NAME_PREFERRED_DURING_SCHEDULING_IGNORED_DURING_EXECUTION) - private List preferredDuringSchedulingIgnoredDuringExecution; + private List preferredDuringSchedulingIgnoredDuringExecution = new ArrayList<>(); public static final String SERIALIZED_NAME_REQUIRED_DURING_SCHEDULING_IGNORED_DURING_EXECUTION = "requiredDuringSchedulingIgnoredDuringExecution"; @SerializedName(SERIALIZED_NAME_REQUIRED_DURING_SCHEDULING_IGNORED_DURING_EXECUTION) - private List requiredDuringSchedulingIgnoredDuringExecution; + private List requiredDuringSchedulingIgnoredDuringExecution = new ArrayList<>(); public V1PodAffinity() { } public V1PodAffinity preferredDuringSchedulingIgnoredDuringExecution(List preferredDuringSchedulingIgnoredDuringExecution) { - this.preferredDuringSchedulingIgnoredDuringExecution = preferredDuringSchedulingIgnoredDuringExecution; return this; } @@ -89,14 +88,12 @@ public List getPreferredDuringSchedulingIgnoredDuring return preferredDuringSchedulingIgnoredDuringExecution; } - public void setPreferredDuringSchedulingIgnoredDuringExecution(List preferredDuringSchedulingIgnoredDuringExecution) { this.preferredDuringSchedulingIgnoredDuringExecution = preferredDuringSchedulingIgnoredDuringExecution; } public V1PodAffinity requiredDuringSchedulingIgnoredDuringExecution(List requiredDuringSchedulingIgnoredDuringExecution) { - this.requiredDuringSchedulingIgnoredDuringExecution = requiredDuringSchedulingIgnoredDuringExecution; return this; } @@ -118,7 +115,6 @@ public List getRequiredDuringSchedulingIgnoredDuringExecution return requiredDuringSchedulingIgnoredDuringExecution; } - public void setRequiredDuringSchedulingIgnoredDuringExecution(List requiredDuringSchedulingIgnoredDuringExecution) { this.requiredDuringSchedulingIgnoredDuringExecution = requiredDuringSchedulingIgnoredDuringExecution; } @@ -179,25 +175,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1PodAffinity + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1PodAffinity */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1PodAffinity.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1PodAffinity.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1PodAffinity is not found in the empty JSON string", V1PodAffinity.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1PodAffinity.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PodAffinity` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PodAffinity` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (jsonObj.get("preferredDuringSchedulingIgnoredDuringExecution") != null && !jsonObj.get("preferredDuringSchedulingIgnoredDuringExecution").isJsonNull()) { JsonArray jsonArraypreferredDuringSchedulingIgnoredDuringExecution = jsonObj.getAsJsonArray("preferredDuringSchedulingIgnoredDuringExecution"); if (jsonArraypreferredDuringSchedulingIgnoredDuringExecution != null) { @@ -208,7 +205,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `preferredDuringSchedulingIgnoredDuringExecution` (array) for (int i = 0; i < jsonArraypreferredDuringSchedulingIgnoredDuringExecution.size(); i++) { - V1WeightedPodAffinityTerm.validateJsonObject(jsonArraypreferredDuringSchedulingIgnoredDuringExecution.get(i).getAsJsonObject()); + V1WeightedPodAffinityTerm.validateJsonElement(jsonArraypreferredDuringSchedulingIgnoredDuringExecution.get(i)); }; } } @@ -222,7 +219,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `requiredDuringSchedulingIgnoredDuringExecution` (array) for (int i = 0; i < jsonArrayrequiredDuringSchedulingIgnoredDuringExecution.size(); i++) { - V1PodAffinityTerm.validateJsonObject(jsonArrayrequiredDuringSchedulingIgnoredDuringExecution.get(i).getAsJsonObject()); + V1PodAffinityTerm.validateJsonElement(jsonArrayrequiredDuringSchedulingIgnoredDuringExecution.get(i)); }; } } @@ -248,9 +245,9 @@ public void write(JsonWriter out, V1PodAffinity value) throws IOException { @Override public V1PodAffinity read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -277,3 +274,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodAffinityTerm.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodAffinityTerm.java index 06670edea1..03eb3a3553 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodAffinityTerm.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodAffinityTerm.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1LabelSelector; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * 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> matches that of any node on which a pod of the set of pods is running */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1PodAffinityTerm { public static final String SERIALIZED_NAME_LABEL_SELECTOR = "labelSelector"; @SerializedName(SERIALIZED_NAME_LABEL_SELECTOR) @@ -60,11 +60,11 @@ public class V1PodAffinityTerm { public static final String SERIALIZED_NAME_MATCH_LABEL_KEYS = "matchLabelKeys"; @SerializedName(SERIALIZED_NAME_MATCH_LABEL_KEYS) - private List matchLabelKeys; + private List matchLabelKeys = new ArrayList<>(); public static final String SERIALIZED_NAME_MISMATCH_LABEL_KEYS = "mismatchLabelKeys"; @SerializedName(SERIALIZED_NAME_MISMATCH_LABEL_KEYS) - private List mismatchLabelKeys; + private List mismatchLabelKeys = new ArrayList<>(); public static final String SERIALIZED_NAME_NAMESPACE_SELECTOR = "namespaceSelector"; @SerializedName(SERIALIZED_NAME_NAMESPACE_SELECTOR) @@ -72,7 +72,7 @@ public class V1PodAffinityTerm { public static final String SERIALIZED_NAME_NAMESPACES = "namespaces"; @SerializedName(SERIALIZED_NAME_NAMESPACES) - private List namespaces; + private List namespaces = new ArrayList<>(); public static final String SERIALIZED_NAME_TOPOLOGY_KEY = "topologyKey"; @SerializedName(SERIALIZED_NAME_TOPOLOGY_KEY) @@ -82,7 +82,6 @@ public V1PodAffinityTerm() { } public V1PodAffinityTerm labelSelector(V1LabelSelector labelSelector) { - this.labelSelector = labelSelector; return this; } @@ -96,14 +95,12 @@ public V1LabelSelector getLabelSelector() { return labelSelector; } - public void setLabelSelector(V1LabelSelector labelSelector) { this.labelSelector = labelSelector; } public V1PodAffinityTerm matchLabelKeys(List matchLabelKeys) { - this.matchLabelKeys = matchLabelKeys; return this; } @@ -125,14 +122,12 @@ public List getMatchLabelKeys() { return matchLabelKeys; } - public void setMatchLabelKeys(List matchLabelKeys) { this.matchLabelKeys = matchLabelKeys; } public V1PodAffinityTerm mismatchLabelKeys(List mismatchLabelKeys) { - this.mismatchLabelKeys = mismatchLabelKeys; return this; } @@ -154,14 +149,12 @@ public List getMismatchLabelKeys() { return mismatchLabelKeys; } - public void setMismatchLabelKeys(List mismatchLabelKeys) { this.mismatchLabelKeys = mismatchLabelKeys; } public V1PodAffinityTerm namespaceSelector(V1LabelSelector namespaceSelector) { - this.namespaceSelector = namespaceSelector; return this; } @@ -175,14 +168,12 @@ public V1LabelSelector getNamespaceSelector() { return namespaceSelector; } - public void setNamespaceSelector(V1LabelSelector namespaceSelector) { this.namespaceSelector = namespaceSelector; } public V1PodAffinityTerm namespaces(List namespaces) { - this.namespaces = namespaces; return this; } @@ -204,14 +195,12 @@ public List getNamespaces() { return namespaces; } - public void setNamespaces(List namespaces) { this.namespaces = namespaces; } public V1PodAffinityTerm topologyKey(String topologyKey) { - this.topologyKey = topologyKey; return this; } @@ -225,7 +214,6 @@ public String getTopologyKey() { return topologyKey; } - public void setTopologyKey(String topologyKey) { this.topologyKey = topologyKey; } @@ -299,50 +287,51 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1PodAffinityTerm + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1PodAffinityTerm */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1PodAffinityTerm.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1PodAffinityTerm.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1PodAffinityTerm is not found in the empty JSON string", V1PodAffinityTerm.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1PodAffinityTerm.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PodAffinityTerm` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PodAffinityTerm` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1PodAffinityTerm.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `labelSelector` if (jsonObj.get("labelSelector") != null && !jsonObj.get("labelSelector").isJsonNull()) { - V1LabelSelector.validateJsonObject(jsonObj.getAsJsonObject("labelSelector")); + V1LabelSelector.validateJsonElement(jsonObj.get("labelSelector")); } // ensure the optional json data is an array if present - if (jsonObj.get("matchLabelKeys") != null && !jsonObj.get("matchLabelKeys").isJsonArray()) { + if (jsonObj.get("matchLabelKeys") != null && !jsonObj.get("matchLabelKeys").isJsonNull() && !jsonObj.get("matchLabelKeys").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `matchLabelKeys` to be an array in the JSON string but got `%s`", jsonObj.get("matchLabelKeys").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("mismatchLabelKeys") != null && !jsonObj.get("mismatchLabelKeys").isJsonArray()) { + if (jsonObj.get("mismatchLabelKeys") != null && !jsonObj.get("mismatchLabelKeys").isJsonNull() && !jsonObj.get("mismatchLabelKeys").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `mismatchLabelKeys` to be an array in the JSON string but got `%s`", jsonObj.get("mismatchLabelKeys").toString())); } // validate the optional field `namespaceSelector` if (jsonObj.get("namespaceSelector") != null && !jsonObj.get("namespaceSelector").isJsonNull()) { - V1LabelSelector.validateJsonObject(jsonObj.getAsJsonObject("namespaceSelector")); + V1LabelSelector.validateJsonElement(jsonObj.get("namespaceSelector")); } // ensure the optional json data is an array if present - if (jsonObj.get("namespaces") != null && !jsonObj.get("namespaces").isJsonArray()) { + if (jsonObj.get("namespaces") != null && !jsonObj.get("namespaces").isJsonNull() && !jsonObj.get("namespaces").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `namespaces` to be an array in the JSON string but got `%s`", jsonObj.get("namespaces").toString())); } if (!jsonObj.get("topologyKey").isJsonPrimitive()) { @@ -370,9 +359,9 @@ public void write(JsonWriter out, V1PodAffinityTerm value) throws IOException { @Override public V1PodAffinityTerm read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -399,3 +388,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodAntiAffinity.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodAntiAffinity.java index 700cf2570c..ae139faee4 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodAntiAffinity.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodAntiAffinity.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1WeightedPodAffinityTerm; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,21 +53,20 @@ /** * Pod anti affinity is a group of inter pod anti affinity scheduling rules. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1PodAntiAffinity { public static final String SERIALIZED_NAME_PREFERRED_DURING_SCHEDULING_IGNORED_DURING_EXECUTION = "preferredDuringSchedulingIgnoredDuringExecution"; @SerializedName(SERIALIZED_NAME_PREFERRED_DURING_SCHEDULING_IGNORED_DURING_EXECUTION) - private List preferredDuringSchedulingIgnoredDuringExecution; + private List preferredDuringSchedulingIgnoredDuringExecution = new ArrayList<>(); public static final String SERIALIZED_NAME_REQUIRED_DURING_SCHEDULING_IGNORED_DURING_EXECUTION = "requiredDuringSchedulingIgnoredDuringExecution"; @SerializedName(SERIALIZED_NAME_REQUIRED_DURING_SCHEDULING_IGNORED_DURING_EXECUTION) - private List requiredDuringSchedulingIgnoredDuringExecution; + private List requiredDuringSchedulingIgnoredDuringExecution = new ArrayList<>(); public V1PodAntiAffinity() { } public V1PodAntiAffinity preferredDuringSchedulingIgnoredDuringExecution(List preferredDuringSchedulingIgnoredDuringExecution) { - this.preferredDuringSchedulingIgnoredDuringExecution = preferredDuringSchedulingIgnoredDuringExecution; return this; } @@ -89,14 +88,12 @@ public List getPreferredDuringSchedulingIgnoredDuring return preferredDuringSchedulingIgnoredDuringExecution; } - public void setPreferredDuringSchedulingIgnoredDuringExecution(List preferredDuringSchedulingIgnoredDuringExecution) { this.preferredDuringSchedulingIgnoredDuringExecution = preferredDuringSchedulingIgnoredDuringExecution; } public V1PodAntiAffinity requiredDuringSchedulingIgnoredDuringExecution(List requiredDuringSchedulingIgnoredDuringExecution) { - this.requiredDuringSchedulingIgnoredDuringExecution = requiredDuringSchedulingIgnoredDuringExecution; return this; } @@ -118,7 +115,6 @@ public List getRequiredDuringSchedulingIgnoredDuringExecution return requiredDuringSchedulingIgnoredDuringExecution; } - public void setRequiredDuringSchedulingIgnoredDuringExecution(List requiredDuringSchedulingIgnoredDuringExecution) { this.requiredDuringSchedulingIgnoredDuringExecution = requiredDuringSchedulingIgnoredDuringExecution; } @@ -179,25 +175,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1PodAntiAffinity + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1PodAntiAffinity */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1PodAntiAffinity.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1PodAntiAffinity.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1PodAntiAffinity is not found in the empty JSON string", V1PodAntiAffinity.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1PodAntiAffinity.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PodAntiAffinity` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PodAntiAffinity` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (jsonObj.get("preferredDuringSchedulingIgnoredDuringExecution") != null && !jsonObj.get("preferredDuringSchedulingIgnoredDuringExecution").isJsonNull()) { JsonArray jsonArraypreferredDuringSchedulingIgnoredDuringExecution = jsonObj.getAsJsonArray("preferredDuringSchedulingIgnoredDuringExecution"); if (jsonArraypreferredDuringSchedulingIgnoredDuringExecution != null) { @@ -208,7 +205,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `preferredDuringSchedulingIgnoredDuringExecution` (array) for (int i = 0; i < jsonArraypreferredDuringSchedulingIgnoredDuringExecution.size(); i++) { - V1WeightedPodAffinityTerm.validateJsonObject(jsonArraypreferredDuringSchedulingIgnoredDuringExecution.get(i).getAsJsonObject()); + V1WeightedPodAffinityTerm.validateJsonElement(jsonArraypreferredDuringSchedulingIgnoredDuringExecution.get(i)); }; } } @@ -222,7 +219,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `requiredDuringSchedulingIgnoredDuringExecution` (array) for (int i = 0; i < jsonArrayrequiredDuringSchedulingIgnoredDuringExecution.size(); i++) { - V1PodAffinityTerm.validateJsonObject(jsonArrayrequiredDuringSchedulingIgnoredDuringExecution.get(i).getAsJsonObject()); + V1PodAffinityTerm.validateJsonElement(jsonArrayrequiredDuringSchedulingIgnoredDuringExecution.get(i)); }; } } @@ -248,9 +245,9 @@ public void write(JsonWriter out, V1PodAntiAffinity value) throws IOException { @Override public V1PodAntiAffinity read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -277,3 +274,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodCondition.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodCondition.java index d9cf620b8f..7bea45d070 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodCondition.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodCondition.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * PodCondition contains details for the current condition of this pod. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1PodCondition { public static final String SERIALIZED_NAME_LAST_PROBE_TIME = "lastProbeTime"; @SerializedName(SERIALIZED_NAME_LAST_PROBE_TIME) @@ -80,7 +80,6 @@ public V1PodCondition() { } public V1PodCondition lastProbeTime(OffsetDateTime lastProbeTime) { - this.lastProbeTime = lastProbeTime; return this; } @@ -94,14 +93,12 @@ public OffsetDateTime getLastProbeTime() { return lastProbeTime; } - public void setLastProbeTime(OffsetDateTime lastProbeTime) { this.lastProbeTime = lastProbeTime; } public V1PodCondition lastTransitionTime(OffsetDateTime lastTransitionTime) { - this.lastTransitionTime = lastTransitionTime; return this; } @@ -115,14 +112,12 @@ public OffsetDateTime getLastTransitionTime() { return lastTransitionTime; } - public void setLastTransitionTime(OffsetDateTime lastTransitionTime) { this.lastTransitionTime = lastTransitionTime; } public V1PodCondition message(String message) { - this.message = message; return this; } @@ -136,14 +131,12 @@ public String getMessage() { return message; } - public void setMessage(String message) { this.message = message; } public V1PodCondition reason(String reason) { - this.reason = reason; return this; } @@ -157,14 +150,12 @@ public String getReason() { return reason; } - public void setReason(String reason) { this.reason = reason; } public V1PodCondition status(String status) { - this.status = status; return this; } @@ -178,14 +169,12 @@ public String getStatus() { return status; } - public void setStatus(String status) { this.status = status; } public V1PodCondition type(String type) { - this.type = type; return this; } @@ -199,7 +188,6 @@ public String getType() { return type; } - public void setType(String type) { this.type = type; } @@ -274,32 +262,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1PodCondition + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1PodCondition */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1PodCondition.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1PodCondition.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1PodCondition is not found in the empty JSON string", V1PodCondition.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1PodCondition.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PodCondition` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PodCondition` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1PodCondition.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); } @@ -334,9 +323,9 @@ public void write(JsonWriter out, V1PodCondition value) throws IOException { @Override public V1PodCondition read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -363,3 +352,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodDNSConfig.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodDNSConfig.java index aaceed03ae..087493b9c1 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodDNSConfig.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodDNSConfig.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1PodDNSConfigOption; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,25 +52,24 @@ /** * PodDNSConfig defines the DNS parameters of a pod in addition to those generated from DNSPolicy. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1PodDNSConfig { public static final String SERIALIZED_NAME_NAMESERVERS = "nameservers"; @SerializedName(SERIALIZED_NAME_NAMESERVERS) - private List nameservers; + private List nameservers = new ArrayList<>(); public static final String SERIALIZED_NAME_OPTIONS = "options"; @SerializedName(SERIALIZED_NAME_OPTIONS) - private List options; + private List options = new ArrayList<>(); public static final String SERIALIZED_NAME_SEARCHES = "searches"; @SerializedName(SERIALIZED_NAME_SEARCHES) - private List searches; + private List searches = new ArrayList<>(); public V1PodDNSConfig() { } public V1PodDNSConfig nameservers(List nameservers) { - this.nameservers = nameservers; return this; } @@ -92,14 +91,12 @@ public List getNameservers() { return nameservers; } - public void setNameservers(List nameservers) { this.nameservers = nameservers; } public V1PodDNSConfig options(List options) { - this.options = options; return this; } @@ -121,14 +118,12 @@ public List getOptions() { return options; } - public void setOptions(List options) { this.options = options; } public V1PodDNSConfig searches(List searches) { - this.searches = searches; return this; } @@ -150,7 +145,6 @@ public List getSearches() { return searches; } - public void setSearches(List searches) { this.searches = searches; } @@ -214,27 +208,28 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1PodDNSConfig + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1PodDNSConfig */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1PodDNSConfig.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1PodDNSConfig.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1PodDNSConfig is not found in the empty JSON string", V1PodDNSConfig.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1PodDNSConfig.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PodDNSConfig` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PodDNSConfig` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the optional json data is an array if present - if (jsonObj.get("nameservers") != null && !jsonObj.get("nameservers").isJsonArray()) { + if (jsonObj.get("nameservers") != null && !jsonObj.get("nameservers").isJsonNull() && !jsonObj.get("nameservers").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `nameservers` to be an array in the JSON string but got `%s`", jsonObj.get("nameservers").toString())); } if (jsonObj.get("options") != null && !jsonObj.get("options").isJsonNull()) { @@ -247,12 +242,12 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `options` (array) for (int i = 0; i < jsonArrayoptions.size(); i++) { - V1PodDNSConfigOption.validateJsonObject(jsonArrayoptions.get(i).getAsJsonObject()); + V1PodDNSConfigOption.validateJsonElement(jsonArrayoptions.get(i)); }; } } // ensure the optional json data is an array if present - if (jsonObj.get("searches") != null && !jsonObj.get("searches").isJsonArray()) { + if (jsonObj.get("searches") != null && !jsonObj.get("searches").isJsonNull() && !jsonObj.get("searches").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `searches` to be an array in the JSON string but got `%s`", jsonObj.get("searches").toString())); } } @@ -277,9 +272,9 @@ public void write(JsonWriter out, V1PodDNSConfig value) throws IOException { @Override public V1PodDNSConfig read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -306,3 +301,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodDNSConfigOption.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodDNSConfigOption.java index 346a691134..8479cf53e0 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodDNSConfigOption.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodDNSConfigOption.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * PodDNSConfigOption defines DNS resolver options of a pod. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1PodDNSConfigOption { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) @@ -63,7 +63,6 @@ public V1PodDNSConfigOption() { } public V1PodDNSConfigOption name(String name) { - this.name = name; return this; } @@ -77,14 +76,12 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } public V1PodDNSConfigOption value(String value) { - this.value = value; return this; } @@ -98,7 +95,6 @@ public String getValue() { return value; } - public void setValue(String value) { this.value = value; } @@ -159,25 +155,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1PodDNSConfigOption + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1PodDNSConfigOption */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1PodDNSConfigOption.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1PodDNSConfigOption.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1PodDNSConfigOption is not found in the empty JSON string", V1PodDNSConfigOption.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1PodDNSConfigOption.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PodDNSConfigOption` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PodDNSConfigOption` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } @@ -206,9 +203,9 @@ public void write(JsonWriter out, V1PodDNSConfigOption value) throws IOException @Override public V1PodDNSConfigOption read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -235,3 +232,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodDisruptionBudget.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodDisruptionBudget.java index 65f6c7e12f..c8f8a51b55 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodDisruptionBudget.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodDisruptionBudget.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1PodDisruptionBudgetSpec; import io.kubernetes.client.openapi.models.V1PodDisruptionBudgetStatus; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1PodDisruptionBudget implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -78,7 +78,6 @@ public V1PodDisruptionBudget() { } public V1PodDisruptionBudget apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -92,14 +91,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1PodDisruptionBudget kind(String kind) { - this.kind = kind; return this; } @@ -113,14 +110,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1PodDisruptionBudget metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -134,14 +129,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V1PodDisruptionBudget spec(V1PodDisruptionBudgetSpec spec) { - this.spec = spec; return this; } @@ -155,14 +148,12 @@ public V1PodDisruptionBudgetSpec getSpec() { return spec; } - public void setSpec(V1PodDisruptionBudgetSpec spec) { this.spec = spec; } public V1PodDisruptionBudget status(V1PodDisruptionBudgetStatus status) { - this.status = status; return this; } @@ -176,7 +167,6 @@ public V1PodDisruptionBudgetStatus getStatus() { return status; } - public void setStatus(V1PodDisruptionBudgetStatus status) { this.status = status; } @@ -246,25 +236,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1PodDisruptionBudget + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1PodDisruptionBudget */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1PodDisruptionBudget.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1PodDisruptionBudget.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1PodDisruptionBudget is not found in the empty JSON string", V1PodDisruptionBudget.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1PodDisruptionBudget.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PodDisruptionBudget` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PodDisruptionBudget` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -273,15 +264,15 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } // validate the optional field `spec` if (jsonObj.get("spec") != null && !jsonObj.get("spec").isJsonNull()) { - V1PodDisruptionBudgetSpec.validateJsonObject(jsonObj.getAsJsonObject("spec")); + V1PodDisruptionBudgetSpec.validateJsonElement(jsonObj.get("spec")); } // validate the optional field `status` if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { - V1PodDisruptionBudgetStatus.validateJsonObject(jsonObj.getAsJsonObject("status")); + V1PodDisruptionBudgetStatus.validateJsonElement(jsonObj.get("status")); } } @@ -305,9 +296,9 @@ public void write(JsonWriter out, V1PodDisruptionBudget value) throws IOExceptio @Override public V1PodDisruptionBudget read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -334,3 +325,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodDisruptionBudgetList.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodDisruptionBudgetList.java index f714ba896c..4d6cf83dd4 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodDisruptionBudgetList.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodDisruptionBudgetList.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1PodDisruptionBudget; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * PodDisruptionBudgetList is a collection of PodDisruptionBudgets. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1PodDisruptionBudgetList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -75,7 +75,6 @@ public V1PodDisruptionBudgetList() { } public V1PodDisruptionBudgetList apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -89,14 +88,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1PodDisruptionBudgetList items(List items) { - this.items = items; return this; } @@ -118,14 +115,12 @@ public List getItems() { return items; } - public void setItems(List items) { this.items = items; } public V1PodDisruptionBudgetList kind(String kind) { - this.kind = kind; return this; } @@ -139,14 +134,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1PodDisruptionBudgetList metadata(V1ListMeta metadata) { - this.metadata = metadata; return this; } @@ -160,7 +153,6 @@ public V1ListMeta getMetadata() { return metadata; } - public void setMetadata(V1ListMeta metadata) { this.metadata = metadata; } @@ -228,32 +220,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1PodDisruptionBudgetList + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1PodDisruptionBudgetList */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1PodDisruptionBudgetList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1PodDisruptionBudgetList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1PodDisruptionBudgetList is not found in the empty JSON string", V1PodDisruptionBudgetList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1PodDisruptionBudgetList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PodDisruptionBudgetList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PodDisruptionBudgetList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1PodDisruptionBudgetList.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -265,14 +258,14 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); // validate the required field `items` (array) for (int i = 0; i < jsonArrayitems.size(); i++) { - V1PodDisruptionBudget.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject()); + V1PodDisruptionBudget.validateJsonElement(jsonArrayitems.get(i)); }; if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ListMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ListMeta.validateJsonElement(jsonObj.get("metadata")); } } @@ -296,9 +289,9 @@ public void write(JsonWriter out, V1PodDisruptionBudgetList value) throws IOExce @Override public V1PodDisruptionBudgetList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -325,3 +318,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodDisruptionBudgetSpec.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodDisruptionBudgetSpec.java index c3a827f733..ade18a51e4 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodDisruptionBudgetSpec.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodDisruptionBudgetSpec.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.custom.IntOrString; import io.kubernetes.client.openapi.models.V1LabelSelector; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -43,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -51,7 +51,7 @@ /** * PodDisruptionBudgetSpec is a description of a PodDisruptionBudget. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1PodDisruptionBudgetSpec { public static final String SERIALIZED_NAME_MAX_UNAVAILABLE = "maxUnavailable"; @SerializedName(SERIALIZED_NAME_MAX_UNAVAILABLE) @@ -73,7 +73,6 @@ public V1PodDisruptionBudgetSpec() { } public V1PodDisruptionBudgetSpec maxUnavailable(IntOrString maxUnavailable) { - this.maxUnavailable = maxUnavailable; return this; } @@ -87,14 +86,12 @@ public IntOrString getMaxUnavailable() { return maxUnavailable; } - public void setMaxUnavailable(IntOrString maxUnavailable) { this.maxUnavailable = maxUnavailable; } public V1PodDisruptionBudgetSpec minAvailable(IntOrString minAvailable) { - this.minAvailable = minAvailable; return this; } @@ -108,14 +105,12 @@ public IntOrString getMinAvailable() { return minAvailable; } - public void setMinAvailable(IntOrString minAvailable) { this.minAvailable = minAvailable; } public V1PodDisruptionBudgetSpec selector(V1LabelSelector selector) { - this.selector = selector; return this; } @@ -129,14 +124,12 @@ public V1LabelSelector getSelector() { return selector; } - public void setSelector(V1LabelSelector selector) { this.selector = selector; } public V1PodDisruptionBudgetSpec unhealthyPodEvictionPolicy(String unhealthyPodEvictionPolicy) { - this.unhealthyPodEvictionPolicy = unhealthyPodEvictionPolicy; return this; } @@ -150,7 +143,6 @@ public String getUnhealthyPodEvictionPolicy() { return unhealthyPodEvictionPolicy; } - public void setUnhealthyPodEvictionPolicy(String unhealthyPodEvictionPolicy) { this.unhealthyPodEvictionPolicy = unhealthyPodEvictionPolicy; } @@ -217,25 +209,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1PodDisruptionBudgetSpec + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1PodDisruptionBudgetSpec */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1PodDisruptionBudgetSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1PodDisruptionBudgetSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1PodDisruptionBudgetSpec is not found in the empty JSON string", V1PodDisruptionBudgetSpec.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1PodDisruptionBudgetSpec.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PodDisruptionBudgetSpec` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PodDisruptionBudgetSpec` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("maxUnavailable") != null && !jsonObj.get("maxUnavailable").isJsonNull()) && !jsonObj.get("maxUnavailable").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `maxUnavailable` to be a primitive type in the JSON string but got `%s`", jsonObj.get("maxUnavailable").toString())); } @@ -244,7 +237,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `selector` if (jsonObj.get("selector") != null && !jsonObj.get("selector").isJsonNull()) { - V1LabelSelector.validateJsonObject(jsonObj.getAsJsonObject("selector")); + V1LabelSelector.validateJsonElement(jsonObj.get("selector")); } if ((jsonObj.get("unhealthyPodEvictionPolicy") != null && !jsonObj.get("unhealthyPodEvictionPolicy").isJsonNull()) && !jsonObj.get("unhealthyPodEvictionPolicy").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `unhealthyPodEvictionPolicy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("unhealthyPodEvictionPolicy").toString())); @@ -271,9 +264,9 @@ public void write(JsonWriter out, V1PodDisruptionBudgetSpec value) throws IOExce @Override public V1PodDisruptionBudgetSpec read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -300,3 +293,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodDisruptionBudgetStatus.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodDisruptionBudgetStatus.java index fc59d97a44..dace0107a7 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodDisruptionBudgetStatus.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodDisruptionBudgetStatus.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; +import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -47,7 +48,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -55,11 +55,11 @@ /** * PodDisruptionBudgetStatus represents information about the status of a PodDisruptionBudget. Status may trail the actual state of a system. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1PodDisruptionBudgetStatus { public static final String SERIALIZED_NAME_CONDITIONS = "conditions"; @SerializedName(SERIALIZED_NAME_CONDITIONS) - private List conditions; + private List conditions = new ArrayList<>(); public static final String SERIALIZED_NAME_CURRENT_HEALTHY = "currentHealthy"; @SerializedName(SERIALIZED_NAME_CURRENT_HEALTHY) @@ -89,7 +89,6 @@ public V1PodDisruptionBudgetStatus() { } public V1PodDisruptionBudgetStatus conditions(List conditions) { - this.conditions = conditions; return this; } @@ -111,14 +110,12 @@ public List getConditions() { return conditions; } - public void setConditions(List conditions) { this.conditions = conditions; } public V1PodDisruptionBudgetStatus currentHealthy(Integer currentHealthy) { - this.currentHealthy = currentHealthy; return this; } @@ -132,14 +129,12 @@ public Integer getCurrentHealthy() { return currentHealthy; } - public void setCurrentHealthy(Integer currentHealthy) { this.currentHealthy = currentHealthy; } public V1PodDisruptionBudgetStatus desiredHealthy(Integer desiredHealthy) { - this.desiredHealthy = desiredHealthy; return this; } @@ -153,14 +148,12 @@ public Integer getDesiredHealthy() { return desiredHealthy; } - public void setDesiredHealthy(Integer desiredHealthy) { this.desiredHealthy = desiredHealthy; } public V1PodDisruptionBudgetStatus disruptedPods(Map disruptedPods) { - this.disruptedPods = disruptedPods; return this; } @@ -182,14 +175,12 @@ public Map getDisruptedPods() { return disruptedPods; } - public void setDisruptedPods(Map disruptedPods) { this.disruptedPods = disruptedPods; } public V1PodDisruptionBudgetStatus disruptionsAllowed(Integer disruptionsAllowed) { - this.disruptionsAllowed = disruptionsAllowed; return this; } @@ -203,14 +194,12 @@ public Integer getDisruptionsAllowed() { return disruptionsAllowed; } - public void setDisruptionsAllowed(Integer disruptionsAllowed) { this.disruptionsAllowed = disruptionsAllowed; } public V1PodDisruptionBudgetStatus expectedPods(Integer expectedPods) { - this.expectedPods = expectedPods; return this; } @@ -224,14 +213,12 @@ public Integer getExpectedPods() { return expectedPods; } - public void setExpectedPods(Integer expectedPods) { this.expectedPods = expectedPods; } public V1PodDisruptionBudgetStatus observedGeneration(Long observedGeneration) { - this.observedGeneration = observedGeneration; return this; } @@ -245,7 +232,6 @@ public Long getObservedGeneration() { return observedGeneration; } - public void setObservedGeneration(Long observedGeneration) { this.observedGeneration = observedGeneration; } @@ -325,32 +311,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1PodDisruptionBudgetStatus + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1PodDisruptionBudgetStatus */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1PodDisruptionBudgetStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1PodDisruptionBudgetStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1PodDisruptionBudgetStatus is not found in the empty JSON string", V1PodDisruptionBudgetStatus.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1PodDisruptionBudgetStatus.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PodDisruptionBudgetStatus` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PodDisruptionBudgetStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1PodDisruptionBudgetStatus.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (jsonObj.get("conditions") != null && !jsonObj.get("conditions").isJsonNull()) { JsonArray jsonArrayconditions = jsonObj.getAsJsonArray("conditions"); if (jsonArrayconditions != null) { @@ -361,7 +348,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `conditions` (array) for (int i = 0; i < jsonArrayconditions.size(); i++) { - V1Condition.validateJsonObject(jsonArrayconditions.get(i).getAsJsonObject()); + V1Condition.validateJsonElement(jsonArrayconditions.get(i)); }; } } @@ -387,9 +374,9 @@ public void write(JsonWriter out, V1PodDisruptionBudgetStatus value) throws IOEx @Override public V1PodDisruptionBudgetStatus read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -416,3 +403,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodFailurePolicy.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodFailurePolicy.java index 55098ccbec..2ea8a033cd 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodFailurePolicy.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodFailurePolicy.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1PodFailurePolicyRule; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * PodFailurePolicy describes how failed pods influence the backoffLimit. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1PodFailurePolicy { public static final String SERIALIZED_NAME_RULES = "rules"; @SerializedName(SERIALIZED_NAME_RULES) @@ -62,7 +62,6 @@ public V1PodFailurePolicy() { } public V1PodFailurePolicy rules(List rules) { - this.rules = rules; return this; } @@ -84,7 +83,6 @@ public List getRules() { return rules; } - public void setRules(List rules) { this.rules = rules; } @@ -143,32 +141,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1PodFailurePolicy + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1PodFailurePolicy */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1PodFailurePolicy.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1PodFailurePolicy.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1PodFailurePolicy is not found in the empty JSON string", V1PodFailurePolicy.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1PodFailurePolicy.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PodFailurePolicy` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PodFailurePolicy` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1PodFailurePolicy.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the json data is an array if (!jsonObj.get("rules").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `rules` to be an array in the JSON string but got `%s`", jsonObj.get("rules").toString())); @@ -177,7 +176,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArrayrules = jsonObj.getAsJsonArray("rules"); // validate the required field `rules` (array) for (int i = 0; i < jsonArrayrules.size(); i++) { - V1PodFailurePolicyRule.validateJsonObject(jsonArrayrules.get(i).getAsJsonObject()); + V1PodFailurePolicyRule.validateJsonElement(jsonArrayrules.get(i)); }; } @@ -201,9 +200,9 @@ public void write(JsonWriter out, V1PodFailurePolicy value) throws IOException { @Override public V1PodFailurePolicy read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -230,3 +229,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodFailurePolicyOnExitCodesRequirement.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodFailurePolicyOnExitCodesRequirement.java index e448759482..9e96cfbbcf 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodFailurePolicyOnExitCodesRequirement.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodFailurePolicyOnExitCodesRequirement.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -43,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -51,7 +51,7 @@ /** * PodFailurePolicyOnExitCodesRequirement describes the requirement for handling a failed pod based on its container exit codes. In particular, it lookups the .state.terminated.exitCode for each app container and init container status, represented by the .status.containerStatuses and .status.initContainerStatuses fields in the Pod status, respectively. Containers completed with success (exit code 0) are excluded from the requirement check. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1PodFailurePolicyOnExitCodesRequirement { public static final String SERIALIZED_NAME_CONTAINER_NAME = "containerName"; @SerializedName(SERIALIZED_NAME_CONTAINER_NAME) @@ -69,7 +69,6 @@ public V1PodFailurePolicyOnExitCodesRequirement() { } public V1PodFailurePolicyOnExitCodesRequirement containerName(String containerName) { - this.containerName = containerName; return this; } @@ -83,14 +82,12 @@ public String getContainerName() { return containerName; } - public void setContainerName(String containerName) { this.containerName = containerName; } public V1PodFailurePolicyOnExitCodesRequirement operator(String operator) { - this.operator = operator; return this; } @@ -104,14 +101,12 @@ public String getOperator() { return operator; } - public void setOperator(String operator) { this.operator = operator; } public V1PodFailurePolicyOnExitCodesRequirement values(List values) { - this.values = values; return this; } @@ -133,7 +128,6 @@ public List getValues() { return values; } - public void setValues(List values) { this.values = values; } @@ -199,32 +193,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1PodFailurePolicyOnExitCodesRequirement + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1PodFailurePolicyOnExitCodesRequirement */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1PodFailurePolicyOnExitCodesRequirement.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1PodFailurePolicyOnExitCodesRequirement.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1PodFailurePolicyOnExitCodesRequirement is not found in the empty JSON string", V1PodFailurePolicyOnExitCodesRequirement.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1PodFailurePolicyOnExitCodesRequirement.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PodFailurePolicyOnExitCodesRequirement` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PodFailurePolicyOnExitCodesRequirement` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1PodFailurePolicyOnExitCodesRequirement.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("containerName") != null && !jsonObj.get("containerName").isJsonNull()) && !jsonObj.get("containerName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `containerName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("containerName").toString())); } @@ -259,9 +254,9 @@ public void write(JsonWriter out, V1PodFailurePolicyOnExitCodesRequirement value @Override public V1PodFailurePolicyOnExitCodesRequirement read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -288,3 +283,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodFailurePolicyOnPodConditionsPattern.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodFailurePolicyOnPodConditionsPattern.java index ad3ee1e875..8bd511fc07 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodFailurePolicyOnPodConditionsPattern.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodFailurePolicyOnPodConditionsPattern.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * PodFailurePolicyOnPodConditionsPattern describes a pattern for matching an actual pod condition type. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1PodFailurePolicyOnPodConditionsPattern { public static final String SERIALIZED_NAME_STATUS = "status"; @SerializedName(SERIALIZED_NAME_STATUS) @@ -63,7 +63,6 @@ public V1PodFailurePolicyOnPodConditionsPattern() { } public V1PodFailurePolicyOnPodConditionsPattern status(String status) { - this.status = status; return this; } @@ -77,14 +76,12 @@ public String getStatus() { return status; } - public void setStatus(String status) { this.status = status; } public V1PodFailurePolicyOnPodConditionsPattern type(String type) { - this.type = type; return this; } @@ -98,7 +95,6 @@ public String getType() { return type; } - public void setType(String type) { this.type = type; } @@ -161,32 +157,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1PodFailurePolicyOnPodConditionsPattern + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1PodFailurePolicyOnPodConditionsPattern */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1PodFailurePolicyOnPodConditionsPattern.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1PodFailurePolicyOnPodConditionsPattern.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1PodFailurePolicyOnPodConditionsPattern is not found in the empty JSON string", V1PodFailurePolicyOnPodConditionsPattern.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1PodFailurePolicyOnPodConditionsPattern.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PodFailurePolicyOnPodConditionsPattern` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PodFailurePolicyOnPodConditionsPattern` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1PodFailurePolicyOnPodConditionsPattern.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("status").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); } @@ -215,9 +212,9 @@ public void write(JsonWriter out, V1PodFailurePolicyOnPodConditionsPattern value @Override public V1PodFailurePolicyOnPodConditionsPattern read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -244,3 +241,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodFailurePolicyRule.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodFailurePolicyRule.java index 4b88714a56..b60647818c 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodFailurePolicyRule.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodFailurePolicyRule.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1PodFailurePolicyOnPodConditionsPattern; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * PodFailurePolicyRule describes how a pod failure is handled when the requirements are met. One of onExitCodes and onPodConditions, but not both, can be used in each rule. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1PodFailurePolicyRule { public static final String SERIALIZED_NAME_ACTION = "action"; @SerializedName(SERIALIZED_NAME_ACTION) @@ -65,13 +65,12 @@ public class V1PodFailurePolicyRule { public static final String SERIALIZED_NAME_ON_POD_CONDITIONS = "onPodConditions"; @SerializedName(SERIALIZED_NAME_ON_POD_CONDITIONS) - private List onPodConditions; + private List onPodConditions = new ArrayList<>(); public V1PodFailurePolicyRule() { } public V1PodFailurePolicyRule action(String action) { - this.action = action; return this; } @@ -85,14 +84,12 @@ public String getAction() { return action; } - public void setAction(String action) { this.action = action; } public V1PodFailurePolicyRule onExitCodes(V1PodFailurePolicyOnExitCodesRequirement onExitCodes) { - this.onExitCodes = onExitCodes; return this; } @@ -106,14 +103,12 @@ public V1PodFailurePolicyOnExitCodesRequirement getOnExitCodes() { return onExitCodes; } - public void setOnExitCodes(V1PodFailurePolicyOnExitCodesRequirement onExitCodes) { this.onExitCodes = onExitCodes; } public V1PodFailurePolicyRule onPodConditions(List onPodConditions) { - this.onPodConditions = onPodConditions; return this; } @@ -135,7 +130,6 @@ public List getOnPodConditions() { return onPodConditions; } - public void setOnPodConditions(List onPodConditions) { this.onPodConditions = onPodConditions; } @@ -200,38 +194,39 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1PodFailurePolicyRule + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1PodFailurePolicyRule */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1PodFailurePolicyRule.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1PodFailurePolicyRule.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1PodFailurePolicyRule is not found in the empty JSON string", V1PodFailurePolicyRule.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1PodFailurePolicyRule.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PodFailurePolicyRule` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PodFailurePolicyRule` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1PodFailurePolicyRule.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("action").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `action` to be a primitive type in the JSON string but got `%s`", jsonObj.get("action").toString())); } // validate the optional field `onExitCodes` if (jsonObj.get("onExitCodes") != null && !jsonObj.get("onExitCodes").isJsonNull()) { - V1PodFailurePolicyOnExitCodesRequirement.validateJsonObject(jsonObj.getAsJsonObject("onExitCodes")); + V1PodFailurePolicyOnExitCodesRequirement.validateJsonElement(jsonObj.get("onExitCodes")); } if (jsonObj.get("onPodConditions") != null && !jsonObj.get("onPodConditions").isJsonNull()) { JsonArray jsonArrayonPodConditions = jsonObj.getAsJsonArray("onPodConditions"); @@ -243,7 +238,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `onPodConditions` (array) for (int i = 0; i < jsonArrayonPodConditions.size(); i++) { - V1PodFailurePolicyOnPodConditionsPattern.validateJsonObject(jsonArrayonPodConditions.get(i).getAsJsonObject()); + V1PodFailurePolicyOnPodConditionsPattern.validateJsonElement(jsonArrayonPodConditions.get(i)); }; } } @@ -269,9 +264,9 @@ public void write(JsonWriter out, V1PodFailurePolicyRule value) throws IOExcepti @Override public V1PodFailurePolicyRule read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -298,3 +293,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodIP.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodIP.java index 2098274a6e..4c200d8c29 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodIP.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodIP.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * PodIP represents a single IP address allocated to the pod. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1PodIP { public static final String SERIALIZED_NAME_IP = "ip"; @SerializedName(SERIALIZED_NAME_IP) @@ -59,7 +59,6 @@ public V1PodIP() { } public V1PodIP ip(String ip) { - this.ip = ip; return this; } @@ -68,12 +67,11 @@ public V1PodIP ip(String ip) { * IP is the IP address assigned to the pod * @return ip **/ - @jakarta.annotation.Nullable + @jakarta.annotation.Nonnull public String getIp() { return ip; } - public void setIp(String ip) { this.ip = ip; } @@ -128,29 +126,38 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("ip"); } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1PodIP + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1PodIP */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1PodIP.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1PodIP.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1PodIP is not found in the empty JSON string", V1PodIP.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1PodIP.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PodIP` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PodIP` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } - if ((jsonObj.get("ip") != null && !jsonObj.get("ip").isJsonNull()) && !jsonObj.get("ip").isJsonPrimitive()) { + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : V1PodIP.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("ip").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `ip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ip").toString())); } } @@ -175,9 +182,9 @@ public void write(JsonWriter out, V1PodIP value) throws IOException { @Override public V1PodIP read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -204,3 +211,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodList.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodList.java index 182bcaf1fe..0648d243f5 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodList.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodList.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1Pod; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * PodList is a list of Pods. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1PodList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -75,7 +75,6 @@ public V1PodList() { } public V1PodList apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -89,14 +88,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1PodList items(List items) { - this.items = items; return this; } @@ -118,14 +115,12 @@ public List getItems() { return items; } - public void setItems(List items) { this.items = items; } public V1PodList kind(String kind) { - this.kind = kind; return this; } @@ -139,14 +134,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1PodList metadata(V1ListMeta metadata) { - this.metadata = metadata; return this; } @@ -160,7 +153,6 @@ public V1ListMeta getMetadata() { return metadata; } - public void setMetadata(V1ListMeta metadata) { this.metadata = metadata; } @@ -228,32 +220,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1PodList + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1PodList */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1PodList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1PodList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1PodList is not found in the empty JSON string", V1PodList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1PodList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PodList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PodList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1PodList.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -265,14 +258,14 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); // validate the required field `items` (array) for (int i = 0; i < jsonArrayitems.size(); i++) { - V1Pod.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject()); + V1Pod.validateJsonElement(jsonArrayitems.get(i)); }; if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ListMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ListMeta.validateJsonElement(jsonObj.get("metadata")); } } @@ -296,9 +289,9 @@ public void write(JsonWriter out, V1PodList value) throws IOException { @Override public V1PodList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -325,3 +318,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodOS.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodOS.java index 1543dbc400..e5ef9b1d62 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodOS.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodOS.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * PodOS defines the OS parameters of a pod. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1PodOS { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) @@ -59,7 +59,6 @@ public V1PodOS() { } public V1PodOS name(String name) { - this.name = name; return this; } @@ -73,7 +72,6 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } @@ -132,32 +130,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1PodOS + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1PodOS */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1PodOS.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1PodOS.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1PodOS is not found in the empty JSON string", V1PodOS.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1PodOS.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PodOS` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PodOS` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1PodOS.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } @@ -183,9 +182,9 @@ public void write(JsonWriter out, V1PodOS value) throws IOException { @Override public V1PodOS read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -212,3 +211,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodReadinessGate.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodReadinessGate.java index 3099967237..e863b48970 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodReadinessGate.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodReadinessGate.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * PodReadinessGate contains the reference to a pod condition */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1PodReadinessGate { public static final String SERIALIZED_NAME_CONDITION_TYPE = "conditionType"; @SerializedName(SERIALIZED_NAME_CONDITION_TYPE) @@ -59,7 +59,6 @@ public V1PodReadinessGate() { } public V1PodReadinessGate conditionType(String conditionType) { - this.conditionType = conditionType; return this; } @@ -73,7 +72,6 @@ public String getConditionType() { return conditionType; } - public void setConditionType(String conditionType) { this.conditionType = conditionType; } @@ -132,32 +130,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1PodReadinessGate + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1PodReadinessGate */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1PodReadinessGate.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1PodReadinessGate.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1PodReadinessGate is not found in the empty JSON string", V1PodReadinessGate.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1PodReadinessGate.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PodReadinessGate` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PodReadinessGate` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1PodReadinessGate.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("conditionType").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `conditionType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("conditionType").toString())); } @@ -183,9 +182,9 @@ public void write(JsonWriter out, V1PodReadinessGate value) throws IOException { @Override public V1PodReadinessGate read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -212,3 +211,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodResourceClaim.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodResourceClaim.java index f94a45b2d9..88fe279b9d 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodResourceClaim.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodResourceClaim.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.openapi.models.V1ClaimSource; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * PodResourceClaim references exactly one ResourceClaim through a ClaimSource. It adds a name to it that uniquely identifies the ResourceClaim inside the Pod. Containers that need access to the ResourceClaim reference it with this name. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1PodResourceClaim { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) @@ -64,7 +64,6 @@ public V1PodResourceClaim() { } public V1PodResourceClaim name(String name) { - this.name = name; return this; } @@ -78,14 +77,12 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } public V1PodResourceClaim source(V1ClaimSource source) { - this.source = source; return this; } @@ -99,7 +96,6 @@ public V1ClaimSource getSource() { return source; } - public void setSource(V1ClaimSource source) { this.source = source; } @@ -161,38 +157,39 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1PodResourceClaim + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1PodResourceClaim */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1PodResourceClaim.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1PodResourceClaim.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1PodResourceClaim is not found in the empty JSON string", V1PodResourceClaim.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1PodResourceClaim.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PodResourceClaim` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PodResourceClaim` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1PodResourceClaim.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } // validate the optional field `source` if (jsonObj.get("source") != null && !jsonObj.get("source").isJsonNull()) { - V1ClaimSource.validateJsonObject(jsonObj.getAsJsonObject("source")); + V1ClaimSource.validateJsonElement(jsonObj.get("source")); } } @@ -216,9 +213,9 @@ public void write(JsonWriter out, V1PodResourceClaim value) throws IOException { @Override public V1PodResourceClaim read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -245,3 +242,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodResourceClaimStatus.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodResourceClaimStatus.java index e30b9aaf4d..27ad6a972d 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodResourceClaimStatus.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodResourceClaimStatus.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * PodResourceClaimStatus is stored in the PodStatus for each PodResourceClaim which references a ResourceClaimTemplate. It stores the generated name for the corresponding ResourceClaim. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1PodResourceClaimStatus { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) @@ -63,7 +63,6 @@ public V1PodResourceClaimStatus() { } public V1PodResourceClaimStatus name(String name) { - this.name = name; return this; } @@ -77,14 +76,12 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } public V1PodResourceClaimStatus resourceClaimName(String resourceClaimName) { - this.resourceClaimName = resourceClaimName; return this; } @@ -98,7 +95,6 @@ public String getResourceClaimName() { return resourceClaimName; } - public void setResourceClaimName(String resourceClaimName) { this.resourceClaimName = resourceClaimName; } @@ -160,32 +156,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1PodResourceClaimStatus + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1PodResourceClaimStatus */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1PodResourceClaimStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1PodResourceClaimStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1PodResourceClaimStatus is not found in the empty JSON string", V1PodResourceClaimStatus.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1PodResourceClaimStatus.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PodResourceClaimStatus` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PodResourceClaimStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1PodResourceClaimStatus.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } @@ -214,9 +211,9 @@ public void write(JsonWriter out, V1PodResourceClaimStatus value) throws IOExcep @Override public V1PodResourceClaimStatus read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -243,3 +240,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodSchedulingGate.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodSchedulingGate.java index 3af43dae94..c4e4b9551c 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodSchedulingGate.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodSchedulingGate.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * PodSchedulingGate is associated to a Pod to guard its scheduling. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1PodSchedulingGate { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) @@ -59,7 +59,6 @@ public V1PodSchedulingGate() { } public V1PodSchedulingGate name(String name) { - this.name = name; return this; } @@ -73,7 +72,6 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } @@ -132,32 +130,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1PodSchedulingGate + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1PodSchedulingGate */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1PodSchedulingGate.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1PodSchedulingGate.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1PodSchedulingGate is not found in the empty JSON string", V1PodSchedulingGate.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1PodSchedulingGate.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PodSchedulingGate` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PodSchedulingGate` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1PodSchedulingGate.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } @@ -183,9 +182,9 @@ public void write(JsonWriter out, V1PodSchedulingGate value) throws IOException @Override public V1PodSchedulingGate read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -212,3 +211,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodSecurityContext.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodSecurityContext.java index 4870456490..6dd9dbad3e 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodSecurityContext.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodSecurityContext.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -26,6 +26,7 @@ import io.kubernetes.client.openapi.models.V1WindowsSecurityContextOptions; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -48,7 +49,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -56,7 +56,7 @@ /** * 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. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1PodSecurityContext { public static final String SERIALIZED_NAME_APP_ARMOR_PROFILE = "appArmorProfile"; @SerializedName(SERIALIZED_NAME_APP_ARMOR_PROFILE) @@ -92,11 +92,11 @@ public class V1PodSecurityContext { public static final String SERIALIZED_NAME_SUPPLEMENTAL_GROUPS = "supplementalGroups"; @SerializedName(SERIALIZED_NAME_SUPPLEMENTAL_GROUPS) - private List supplementalGroups; + private List supplementalGroups = new ArrayList<>(); public static final String SERIALIZED_NAME_SYSCTLS = "sysctls"; @SerializedName(SERIALIZED_NAME_SYSCTLS) - private List sysctls; + private List sysctls = new ArrayList<>(); public static final String SERIALIZED_NAME_WINDOWS_OPTIONS = "windowsOptions"; @SerializedName(SERIALIZED_NAME_WINDOWS_OPTIONS) @@ -106,7 +106,6 @@ public V1PodSecurityContext() { } public V1PodSecurityContext appArmorProfile(V1AppArmorProfile appArmorProfile) { - this.appArmorProfile = appArmorProfile; return this; } @@ -120,14 +119,12 @@ public V1AppArmorProfile getAppArmorProfile() { return appArmorProfile; } - public void setAppArmorProfile(V1AppArmorProfile appArmorProfile) { this.appArmorProfile = appArmorProfile; } public V1PodSecurityContext fsGroup(Long fsGroup) { - this.fsGroup = fsGroup; return this; } @@ -141,14 +138,12 @@ public Long getFsGroup() { return fsGroup; } - public void setFsGroup(Long fsGroup) { this.fsGroup = fsGroup; } public V1PodSecurityContext fsGroupChangePolicy(String fsGroupChangePolicy) { - this.fsGroupChangePolicy = fsGroupChangePolicy; return this; } @@ -162,14 +157,12 @@ public String getFsGroupChangePolicy() { return fsGroupChangePolicy; } - public void setFsGroupChangePolicy(String fsGroupChangePolicy) { this.fsGroupChangePolicy = fsGroupChangePolicy; } public V1PodSecurityContext runAsGroup(Long runAsGroup) { - this.runAsGroup = runAsGroup; return this; } @@ -183,14 +176,12 @@ public Long getRunAsGroup() { return runAsGroup; } - public void setRunAsGroup(Long runAsGroup) { this.runAsGroup = runAsGroup; } public V1PodSecurityContext runAsNonRoot(Boolean runAsNonRoot) { - this.runAsNonRoot = runAsNonRoot; return this; } @@ -204,14 +195,12 @@ public Boolean getRunAsNonRoot() { return runAsNonRoot; } - public void setRunAsNonRoot(Boolean runAsNonRoot) { this.runAsNonRoot = runAsNonRoot; } public V1PodSecurityContext runAsUser(Long runAsUser) { - this.runAsUser = runAsUser; return this; } @@ -225,14 +214,12 @@ public Long getRunAsUser() { return runAsUser; } - public void setRunAsUser(Long runAsUser) { this.runAsUser = runAsUser; } public V1PodSecurityContext seLinuxOptions(V1SELinuxOptions seLinuxOptions) { - this.seLinuxOptions = seLinuxOptions; return this; } @@ -246,14 +233,12 @@ public V1SELinuxOptions getSeLinuxOptions() { return seLinuxOptions; } - public void setSeLinuxOptions(V1SELinuxOptions seLinuxOptions) { this.seLinuxOptions = seLinuxOptions; } public V1PodSecurityContext seccompProfile(V1SeccompProfile seccompProfile) { - this.seccompProfile = seccompProfile; return this; } @@ -267,14 +252,12 @@ public V1SeccompProfile getSeccompProfile() { return seccompProfile; } - public void setSeccompProfile(V1SeccompProfile seccompProfile) { this.seccompProfile = seccompProfile; } public V1PodSecurityContext supplementalGroups(List supplementalGroups) { - this.supplementalGroups = supplementalGroups; return this; } @@ -296,14 +279,12 @@ public List getSupplementalGroups() { return supplementalGroups; } - public void setSupplementalGroups(List supplementalGroups) { this.supplementalGroups = supplementalGroups; } public V1PodSecurityContext sysctls(List sysctls) { - this.sysctls = sysctls; return this; } @@ -325,14 +306,12 @@ public List getSysctls() { return sysctls; } - public void setSysctls(List sysctls) { this.sysctls = sysctls; } public V1PodSecurityContext windowsOptions(V1WindowsSecurityContextOptions windowsOptions) { - this.windowsOptions = windowsOptions; return this; } @@ -346,7 +325,6 @@ public V1WindowsSecurityContextOptions getWindowsOptions() { return windowsOptions; } - public void setWindowsOptions(V1WindowsSecurityContextOptions windowsOptions) { this.windowsOptions = windowsOptions; } @@ -434,42 +412,43 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1PodSecurityContext + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1PodSecurityContext */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1PodSecurityContext.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1PodSecurityContext.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1PodSecurityContext is not found in the empty JSON string", V1PodSecurityContext.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1PodSecurityContext.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PodSecurityContext` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PodSecurityContext` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `appArmorProfile` if (jsonObj.get("appArmorProfile") != null && !jsonObj.get("appArmorProfile").isJsonNull()) { - V1AppArmorProfile.validateJsonObject(jsonObj.getAsJsonObject("appArmorProfile")); + V1AppArmorProfile.validateJsonElement(jsonObj.get("appArmorProfile")); } if ((jsonObj.get("fsGroupChangePolicy") != null && !jsonObj.get("fsGroupChangePolicy").isJsonNull()) && !jsonObj.get("fsGroupChangePolicy").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `fsGroupChangePolicy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fsGroupChangePolicy").toString())); } // validate the optional field `seLinuxOptions` if (jsonObj.get("seLinuxOptions") != null && !jsonObj.get("seLinuxOptions").isJsonNull()) { - V1SELinuxOptions.validateJsonObject(jsonObj.getAsJsonObject("seLinuxOptions")); + V1SELinuxOptions.validateJsonElement(jsonObj.get("seLinuxOptions")); } // validate the optional field `seccompProfile` if (jsonObj.get("seccompProfile") != null && !jsonObj.get("seccompProfile").isJsonNull()) { - V1SeccompProfile.validateJsonObject(jsonObj.getAsJsonObject("seccompProfile")); + V1SeccompProfile.validateJsonElement(jsonObj.get("seccompProfile")); } // ensure the optional json data is an array if present - if (jsonObj.get("supplementalGroups") != null && !jsonObj.get("supplementalGroups").isJsonArray()) { + if (jsonObj.get("supplementalGroups") != null && !jsonObj.get("supplementalGroups").isJsonNull() && !jsonObj.get("supplementalGroups").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `supplementalGroups` to be an array in the JSON string but got `%s`", jsonObj.get("supplementalGroups").toString())); } if (jsonObj.get("sysctls") != null && !jsonObj.get("sysctls").isJsonNull()) { @@ -482,13 +461,13 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `sysctls` (array) for (int i = 0; i < jsonArraysysctls.size(); i++) { - V1Sysctl.validateJsonObject(jsonArraysysctls.get(i).getAsJsonObject()); + V1Sysctl.validateJsonElement(jsonArraysysctls.get(i)); }; } } // validate the optional field `windowsOptions` if (jsonObj.get("windowsOptions") != null && !jsonObj.get("windowsOptions").isJsonNull()) { - V1WindowsSecurityContextOptions.validateJsonObject(jsonObj.getAsJsonObject("windowsOptions")); + V1WindowsSecurityContextOptions.validateJsonElement(jsonObj.get("windowsOptions")); } } @@ -512,9 +491,9 @@ public void write(JsonWriter out, V1PodSecurityContext value) throws IOException @Override public V1PodSecurityContext read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -541,3 +520,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodSpec.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodSpec.java index ced40fdad1..02ff575c2f 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodSpec.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodSpec.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -36,6 +36,7 @@ import io.kubernetes.client.openapi.models.V1Volume; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -60,7 +61,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -68,7 +68,7 @@ /** * PodSpec is a description of a pod. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1PodSpec { public static final String SERIALIZED_NAME_ACTIVE_DEADLINE_SECONDS = "activeDeadlineSeconds"; @SerializedName(SERIALIZED_NAME_ACTIVE_DEADLINE_SECONDS) @@ -100,11 +100,11 @@ public class V1PodSpec { public static final String SERIALIZED_NAME_EPHEMERAL_CONTAINERS = "ephemeralContainers"; @SerializedName(SERIALIZED_NAME_EPHEMERAL_CONTAINERS) - private List ephemeralContainers; + private List ephemeralContainers = new ArrayList<>(); public static final String SERIALIZED_NAME_HOST_ALIASES = "hostAliases"; @SerializedName(SERIALIZED_NAME_HOST_ALIASES) - private List hostAliases; + private List hostAliases = new ArrayList<>(); public static final String SERIALIZED_NAME_HOST_I_P_C = "hostIPC"; @SerializedName(SERIALIZED_NAME_HOST_I_P_C) @@ -128,11 +128,11 @@ public class V1PodSpec { public static final String SERIALIZED_NAME_IMAGE_PULL_SECRETS = "imagePullSecrets"; @SerializedName(SERIALIZED_NAME_IMAGE_PULL_SECRETS) - private List imagePullSecrets; + private List imagePullSecrets = new ArrayList<>(); public static final String SERIALIZED_NAME_INIT_CONTAINERS = "initContainers"; @SerializedName(SERIALIZED_NAME_INIT_CONTAINERS) - private List initContainers; + private List initContainers = new ArrayList<>(); public static final String SERIALIZED_NAME_NODE_NAME = "nodeName"; @SerializedName(SERIALIZED_NAME_NODE_NAME) @@ -164,11 +164,11 @@ public class V1PodSpec { public static final String SERIALIZED_NAME_READINESS_GATES = "readinessGates"; @SerializedName(SERIALIZED_NAME_READINESS_GATES) - private List readinessGates; + private List readinessGates = new ArrayList<>(); public static final String SERIALIZED_NAME_RESOURCE_CLAIMS = "resourceClaims"; @SerializedName(SERIALIZED_NAME_RESOURCE_CLAIMS) - private List resourceClaims; + private List resourceClaims = new ArrayList<>(); public static final String SERIALIZED_NAME_RESTART_POLICY = "restartPolicy"; @SerializedName(SERIALIZED_NAME_RESTART_POLICY) @@ -184,7 +184,7 @@ public class V1PodSpec { public static final String SERIALIZED_NAME_SCHEDULING_GATES = "schedulingGates"; @SerializedName(SERIALIZED_NAME_SCHEDULING_GATES) - private List schedulingGates; + private List schedulingGates = new ArrayList<>(); public static final String SERIALIZED_NAME_SECURITY_CONTEXT = "securityContext"; @SerializedName(SERIALIZED_NAME_SECURITY_CONTEXT) @@ -216,21 +216,20 @@ public class V1PodSpec { public static final String SERIALIZED_NAME_TOLERATIONS = "tolerations"; @SerializedName(SERIALIZED_NAME_TOLERATIONS) - private List tolerations; + private List tolerations = new ArrayList<>(); public static final String SERIALIZED_NAME_TOPOLOGY_SPREAD_CONSTRAINTS = "topologySpreadConstraints"; @SerializedName(SERIALIZED_NAME_TOPOLOGY_SPREAD_CONSTRAINTS) - private List topologySpreadConstraints; + private List topologySpreadConstraints = new ArrayList<>(); public static final String SERIALIZED_NAME_VOLUMES = "volumes"; @SerializedName(SERIALIZED_NAME_VOLUMES) - private List volumes; + private List volumes = new ArrayList<>(); public V1PodSpec() { } public V1PodSpec activeDeadlineSeconds(Long activeDeadlineSeconds) { - this.activeDeadlineSeconds = activeDeadlineSeconds; return this; } @@ -244,14 +243,12 @@ public Long getActiveDeadlineSeconds() { return activeDeadlineSeconds; } - public void setActiveDeadlineSeconds(Long activeDeadlineSeconds) { this.activeDeadlineSeconds = activeDeadlineSeconds; } public V1PodSpec affinity(V1Affinity affinity) { - this.affinity = affinity; return this; } @@ -265,14 +262,12 @@ public V1Affinity getAffinity() { return affinity; } - public void setAffinity(V1Affinity affinity) { this.affinity = affinity; } public V1PodSpec automountServiceAccountToken(Boolean automountServiceAccountToken) { - this.automountServiceAccountToken = automountServiceAccountToken; return this; } @@ -286,14 +281,12 @@ public Boolean getAutomountServiceAccountToken() { return automountServiceAccountToken; } - public void setAutomountServiceAccountToken(Boolean automountServiceAccountToken) { this.automountServiceAccountToken = automountServiceAccountToken; } public V1PodSpec containers(List containers) { - this.containers = containers; return this; } @@ -315,14 +308,12 @@ public List getContainers() { return containers; } - public void setContainers(List containers) { this.containers = containers; } public V1PodSpec dnsConfig(V1PodDNSConfig dnsConfig) { - this.dnsConfig = dnsConfig; return this; } @@ -336,14 +327,12 @@ public V1PodDNSConfig getDnsConfig() { return dnsConfig; } - public void setDnsConfig(V1PodDNSConfig dnsConfig) { this.dnsConfig = dnsConfig; } public V1PodSpec dnsPolicy(String dnsPolicy) { - this.dnsPolicy = dnsPolicy; return this; } @@ -357,14 +346,12 @@ public String getDnsPolicy() { return dnsPolicy; } - public void setDnsPolicy(String dnsPolicy) { this.dnsPolicy = dnsPolicy; } public V1PodSpec enableServiceLinks(Boolean enableServiceLinks) { - this.enableServiceLinks = enableServiceLinks; return this; } @@ -378,14 +365,12 @@ public Boolean getEnableServiceLinks() { return enableServiceLinks; } - public void setEnableServiceLinks(Boolean enableServiceLinks) { this.enableServiceLinks = enableServiceLinks; } public V1PodSpec ephemeralContainers(List ephemeralContainers) { - this.ephemeralContainers = ephemeralContainers; return this; } @@ -407,14 +392,12 @@ public List getEphemeralContainers() { return ephemeralContainers; } - public void setEphemeralContainers(List ephemeralContainers) { this.ephemeralContainers = ephemeralContainers; } public V1PodSpec hostAliases(List hostAliases) { - this.hostAliases = hostAliases; return this; } @@ -436,14 +419,12 @@ public List getHostAliases() { return hostAliases; } - public void setHostAliases(List hostAliases) { this.hostAliases = hostAliases; } public V1PodSpec hostIPC(Boolean hostIPC) { - this.hostIPC = hostIPC; return this; } @@ -457,14 +438,12 @@ public Boolean getHostIPC() { return hostIPC; } - public void setHostIPC(Boolean hostIPC) { this.hostIPC = hostIPC; } public V1PodSpec hostNetwork(Boolean hostNetwork) { - this.hostNetwork = hostNetwork; return this; } @@ -478,14 +457,12 @@ public Boolean getHostNetwork() { return hostNetwork; } - public void setHostNetwork(Boolean hostNetwork) { this.hostNetwork = hostNetwork; } public V1PodSpec hostPID(Boolean hostPID) { - this.hostPID = hostPID; return this; } @@ -499,14 +476,12 @@ public Boolean getHostPID() { return hostPID; } - public void setHostPID(Boolean hostPID) { this.hostPID = hostPID; } public V1PodSpec hostUsers(Boolean hostUsers) { - this.hostUsers = hostUsers; return this; } @@ -520,14 +495,12 @@ public Boolean getHostUsers() { return hostUsers; } - public void setHostUsers(Boolean hostUsers) { this.hostUsers = hostUsers; } public V1PodSpec hostname(String hostname) { - this.hostname = hostname; return this; } @@ -541,14 +514,12 @@ public String getHostname() { return hostname; } - public void setHostname(String hostname) { this.hostname = hostname; } public V1PodSpec imagePullSecrets(List imagePullSecrets) { - this.imagePullSecrets = imagePullSecrets; return this; } @@ -570,14 +541,12 @@ public List getImagePullSecrets() { return imagePullSecrets; } - public void setImagePullSecrets(List imagePullSecrets) { this.imagePullSecrets = imagePullSecrets; } public V1PodSpec initContainers(List initContainers) { - this.initContainers = initContainers; return this; } @@ -599,14 +568,12 @@ public List getInitContainers() { return initContainers; } - public void setInitContainers(List initContainers) { this.initContainers = initContainers; } public V1PodSpec nodeName(String nodeName) { - this.nodeName = nodeName; return this; } @@ -620,14 +587,12 @@ public String getNodeName() { return nodeName; } - public void setNodeName(String nodeName) { this.nodeName = nodeName; } public V1PodSpec nodeSelector(Map nodeSelector) { - this.nodeSelector = nodeSelector; return this; } @@ -649,14 +614,12 @@ public Map getNodeSelector() { return nodeSelector; } - public void setNodeSelector(Map nodeSelector) { this.nodeSelector = nodeSelector; } public V1PodSpec os(V1PodOS os) { - this.os = os; return this; } @@ -670,14 +633,12 @@ public V1PodOS getOs() { return os; } - public void setOs(V1PodOS os) { this.os = os; } public V1PodSpec overhead(Map overhead) { - this.overhead = overhead; return this; } @@ -699,14 +660,12 @@ public Map getOverhead() { return overhead; } - public void setOverhead(Map overhead) { this.overhead = overhead; } public V1PodSpec preemptionPolicy(String preemptionPolicy) { - this.preemptionPolicy = preemptionPolicy; return this; } @@ -720,14 +679,12 @@ public String getPreemptionPolicy() { return preemptionPolicy; } - public void setPreemptionPolicy(String preemptionPolicy) { this.preemptionPolicy = preemptionPolicy; } public V1PodSpec priority(Integer priority) { - this.priority = priority; return this; } @@ -741,14 +698,12 @@ public Integer getPriority() { return priority; } - public void setPriority(Integer priority) { this.priority = priority; } public V1PodSpec priorityClassName(String priorityClassName) { - this.priorityClassName = priorityClassName; return this; } @@ -762,14 +717,12 @@ public String getPriorityClassName() { return priorityClassName; } - public void setPriorityClassName(String priorityClassName) { this.priorityClassName = priorityClassName; } public V1PodSpec readinessGates(List readinessGates) { - this.readinessGates = readinessGates; return this; } @@ -791,14 +744,12 @@ public List getReadinessGates() { return readinessGates; } - public void setReadinessGates(List readinessGates) { this.readinessGates = readinessGates; } public V1PodSpec resourceClaims(List resourceClaims) { - this.resourceClaims = resourceClaims; return this; } @@ -820,14 +771,12 @@ public List getResourceClaims() { return resourceClaims; } - public void setResourceClaims(List resourceClaims) { this.resourceClaims = resourceClaims; } public V1PodSpec restartPolicy(String restartPolicy) { - this.restartPolicy = restartPolicy; return this; } @@ -841,14 +790,12 @@ public String getRestartPolicy() { return restartPolicy; } - public void setRestartPolicy(String restartPolicy) { this.restartPolicy = restartPolicy; } public V1PodSpec runtimeClassName(String runtimeClassName) { - this.runtimeClassName = runtimeClassName; return this; } @@ -862,14 +809,12 @@ public String getRuntimeClassName() { return runtimeClassName; } - public void setRuntimeClassName(String runtimeClassName) { this.runtimeClassName = runtimeClassName; } public V1PodSpec schedulerName(String schedulerName) { - this.schedulerName = schedulerName; return this; } @@ -883,14 +828,12 @@ public String getSchedulerName() { return schedulerName; } - public void setSchedulerName(String schedulerName) { this.schedulerName = schedulerName; } public V1PodSpec schedulingGates(List schedulingGates) { - this.schedulingGates = schedulingGates; return this; } @@ -912,14 +855,12 @@ public List getSchedulingGates() { return schedulingGates; } - public void setSchedulingGates(List schedulingGates) { this.schedulingGates = schedulingGates; } public V1PodSpec securityContext(V1PodSecurityContext securityContext) { - this.securityContext = securityContext; return this; } @@ -933,14 +874,12 @@ public V1PodSecurityContext getSecurityContext() { return securityContext; } - public void setSecurityContext(V1PodSecurityContext securityContext) { this.securityContext = securityContext; } public V1PodSpec serviceAccount(String serviceAccount) { - this.serviceAccount = serviceAccount; return this; } @@ -954,14 +893,12 @@ public String getServiceAccount() { return serviceAccount; } - public void setServiceAccount(String serviceAccount) { this.serviceAccount = serviceAccount; } public V1PodSpec serviceAccountName(String serviceAccountName) { - this.serviceAccountName = serviceAccountName; return this; } @@ -975,14 +912,12 @@ public String getServiceAccountName() { return serviceAccountName; } - public void setServiceAccountName(String serviceAccountName) { this.serviceAccountName = serviceAccountName; } public V1PodSpec setHostnameAsFQDN(Boolean setHostnameAsFQDN) { - this.setHostnameAsFQDN = setHostnameAsFQDN; return this; } @@ -996,14 +931,12 @@ public Boolean getSetHostnameAsFQDN() { return setHostnameAsFQDN; } - public void setSetHostnameAsFQDN(Boolean setHostnameAsFQDN) { this.setHostnameAsFQDN = setHostnameAsFQDN; } public V1PodSpec shareProcessNamespace(Boolean shareProcessNamespace) { - this.shareProcessNamespace = shareProcessNamespace; return this; } @@ -1017,14 +950,12 @@ public Boolean getShareProcessNamespace() { return shareProcessNamespace; } - public void setShareProcessNamespace(Boolean shareProcessNamespace) { this.shareProcessNamespace = shareProcessNamespace; } public V1PodSpec subdomain(String subdomain) { - this.subdomain = subdomain; return this; } @@ -1038,14 +969,12 @@ public String getSubdomain() { return subdomain; } - public void setSubdomain(String subdomain) { this.subdomain = subdomain; } public V1PodSpec terminationGracePeriodSeconds(Long terminationGracePeriodSeconds) { - this.terminationGracePeriodSeconds = terminationGracePeriodSeconds; return this; } @@ -1059,14 +988,12 @@ public Long getTerminationGracePeriodSeconds() { return terminationGracePeriodSeconds; } - public void setTerminationGracePeriodSeconds(Long terminationGracePeriodSeconds) { this.terminationGracePeriodSeconds = terminationGracePeriodSeconds; } public V1PodSpec tolerations(List tolerations) { - this.tolerations = tolerations; return this; } @@ -1088,14 +1015,12 @@ public List getTolerations() { return tolerations; } - public void setTolerations(List tolerations) { this.tolerations = tolerations; } public V1PodSpec topologySpreadConstraints(List topologySpreadConstraints) { - this.topologySpreadConstraints = topologySpreadConstraints; return this; } @@ -1117,14 +1042,12 @@ public List getTopologySpreadConstraints() { return topologySpreadConstraints; } - public void setTopologySpreadConstraints(List topologySpreadConstraints) { this.topologySpreadConstraints = topologySpreadConstraints; } public V1PodSpec volumes(List volumes) { - this.volumes = volumes; return this; } @@ -1146,7 +1069,6 @@ public List getVolumes() { return volumes; } - public void setVolumes(List volumes) { this.volumes = volumes; } @@ -1319,35 +1241,36 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1PodSpec + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1PodSpec */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1PodSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1PodSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1PodSpec is not found in the empty JSON string", V1PodSpec.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1PodSpec.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PodSpec` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PodSpec` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1PodSpec.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `affinity` if (jsonObj.get("affinity") != null && !jsonObj.get("affinity").isJsonNull()) { - V1Affinity.validateJsonObject(jsonObj.getAsJsonObject("affinity")); + V1Affinity.validateJsonElement(jsonObj.get("affinity")); } // ensure the json data is an array if (!jsonObj.get("containers").isJsonArray()) { @@ -1357,11 +1280,11 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArraycontainers = jsonObj.getAsJsonArray("containers"); // validate the required field `containers` (array) for (int i = 0; i < jsonArraycontainers.size(); i++) { - V1Container.validateJsonObject(jsonArraycontainers.get(i).getAsJsonObject()); + V1Container.validateJsonElement(jsonArraycontainers.get(i)); }; // validate the optional field `dnsConfig` if (jsonObj.get("dnsConfig") != null && !jsonObj.get("dnsConfig").isJsonNull()) { - V1PodDNSConfig.validateJsonObject(jsonObj.getAsJsonObject("dnsConfig")); + V1PodDNSConfig.validateJsonElement(jsonObj.get("dnsConfig")); } if ((jsonObj.get("dnsPolicy") != null && !jsonObj.get("dnsPolicy").isJsonNull()) && !jsonObj.get("dnsPolicy").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `dnsPolicy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dnsPolicy").toString())); @@ -1376,7 +1299,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `ephemeralContainers` (array) for (int i = 0; i < jsonArrayephemeralContainers.size(); i++) { - V1EphemeralContainer.validateJsonObject(jsonArrayephemeralContainers.get(i).getAsJsonObject()); + V1EphemeralContainer.validateJsonElement(jsonArrayephemeralContainers.get(i)); }; } } @@ -1390,7 +1313,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `hostAliases` (array) for (int i = 0; i < jsonArrayhostAliases.size(); i++) { - V1HostAlias.validateJsonObject(jsonArrayhostAliases.get(i).getAsJsonObject()); + V1HostAlias.validateJsonElement(jsonArrayhostAliases.get(i)); }; } } @@ -1407,7 +1330,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `imagePullSecrets` (array) for (int i = 0; i < jsonArrayimagePullSecrets.size(); i++) { - V1LocalObjectReference.validateJsonObject(jsonArrayimagePullSecrets.get(i).getAsJsonObject()); + V1LocalObjectReference.validateJsonElement(jsonArrayimagePullSecrets.get(i)); }; } } @@ -1421,7 +1344,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `initContainers` (array) for (int i = 0; i < jsonArrayinitContainers.size(); i++) { - V1Container.validateJsonObject(jsonArrayinitContainers.get(i).getAsJsonObject()); + V1Container.validateJsonElement(jsonArrayinitContainers.get(i)); }; } } @@ -1430,7 +1353,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `os` if (jsonObj.get("os") != null && !jsonObj.get("os").isJsonNull()) { - V1PodOS.validateJsonObject(jsonObj.getAsJsonObject("os")); + V1PodOS.validateJsonElement(jsonObj.get("os")); } if ((jsonObj.get("preemptionPolicy") != null && !jsonObj.get("preemptionPolicy").isJsonNull()) && !jsonObj.get("preemptionPolicy").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `preemptionPolicy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("preemptionPolicy").toString())); @@ -1448,7 +1371,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `readinessGates` (array) for (int i = 0; i < jsonArrayreadinessGates.size(); i++) { - V1PodReadinessGate.validateJsonObject(jsonArrayreadinessGates.get(i).getAsJsonObject()); + V1PodReadinessGate.validateJsonElement(jsonArrayreadinessGates.get(i)); }; } } @@ -1462,7 +1385,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `resourceClaims` (array) for (int i = 0; i < jsonArrayresourceClaims.size(); i++) { - V1PodResourceClaim.validateJsonObject(jsonArrayresourceClaims.get(i).getAsJsonObject()); + V1PodResourceClaim.validateJsonElement(jsonArrayresourceClaims.get(i)); }; } } @@ -1485,13 +1408,13 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `schedulingGates` (array) for (int i = 0; i < jsonArrayschedulingGates.size(); i++) { - V1PodSchedulingGate.validateJsonObject(jsonArrayschedulingGates.get(i).getAsJsonObject()); + V1PodSchedulingGate.validateJsonElement(jsonArrayschedulingGates.get(i)); }; } } // validate the optional field `securityContext` if (jsonObj.get("securityContext") != null && !jsonObj.get("securityContext").isJsonNull()) { - V1PodSecurityContext.validateJsonObject(jsonObj.getAsJsonObject("securityContext")); + V1PodSecurityContext.validateJsonElement(jsonObj.get("securityContext")); } if ((jsonObj.get("serviceAccount") != null && !jsonObj.get("serviceAccount").isJsonNull()) && !jsonObj.get("serviceAccount").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `serviceAccount` to be a primitive type in the JSON string but got `%s`", jsonObj.get("serviceAccount").toString())); @@ -1512,7 +1435,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `tolerations` (array) for (int i = 0; i < jsonArraytolerations.size(); i++) { - V1Toleration.validateJsonObject(jsonArraytolerations.get(i).getAsJsonObject()); + V1Toleration.validateJsonElement(jsonArraytolerations.get(i)); }; } } @@ -1526,7 +1449,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `topologySpreadConstraints` (array) for (int i = 0; i < jsonArraytopologySpreadConstraints.size(); i++) { - V1TopologySpreadConstraint.validateJsonObject(jsonArraytopologySpreadConstraints.get(i).getAsJsonObject()); + V1TopologySpreadConstraint.validateJsonElement(jsonArraytopologySpreadConstraints.get(i)); }; } } @@ -1540,7 +1463,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `volumes` (array) for (int i = 0; i < jsonArrayvolumes.size(); i++) { - V1Volume.validateJsonObject(jsonArrayvolumes.get(i).getAsJsonObject()); + V1Volume.validateJsonElement(jsonArrayvolumes.get(i)); }; } } @@ -1566,9 +1489,9 @@ public void write(JsonWriter out, V1PodSpec value) throws IOException { @Override public V1PodSpec read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -1595,3 +1518,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodStatus.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodStatus.java index 8bb76a43ba..9481733d23 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodStatus.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodStatus.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -27,6 +27,7 @@ import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -49,7 +50,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -57,19 +57,19 @@ /** * PodStatus represents information about the status of a pod. Status may trail the actual state of a system, especially if the node that hosts the pod cannot contact the control plane. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1PodStatus { public static final String SERIALIZED_NAME_CONDITIONS = "conditions"; @SerializedName(SERIALIZED_NAME_CONDITIONS) - private List conditions; + private List conditions = new ArrayList<>(); public static final String SERIALIZED_NAME_CONTAINER_STATUSES = "containerStatuses"; @SerializedName(SERIALIZED_NAME_CONTAINER_STATUSES) - private List containerStatuses; + private List containerStatuses = new ArrayList<>(); public static final String SERIALIZED_NAME_EPHEMERAL_CONTAINER_STATUSES = "ephemeralContainerStatuses"; @SerializedName(SERIALIZED_NAME_EPHEMERAL_CONTAINER_STATUSES) - private List ephemeralContainerStatuses; + private List ephemeralContainerStatuses = new ArrayList<>(); public static final String SERIALIZED_NAME_HOST_I_P = "hostIP"; @SerializedName(SERIALIZED_NAME_HOST_I_P) @@ -77,11 +77,11 @@ public class V1PodStatus { public static final String SERIALIZED_NAME_HOST_I_PS = "hostIPs"; @SerializedName(SERIALIZED_NAME_HOST_I_PS) - private List hostIPs; + private List hostIPs = new ArrayList<>(); public static final String SERIALIZED_NAME_INIT_CONTAINER_STATUSES = "initContainerStatuses"; @SerializedName(SERIALIZED_NAME_INIT_CONTAINER_STATUSES) - private List initContainerStatuses; + private List initContainerStatuses = new ArrayList<>(); public static final String SERIALIZED_NAME_MESSAGE = "message"; @SerializedName(SERIALIZED_NAME_MESSAGE) @@ -101,7 +101,7 @@ public class V1PodStatus { public static final String SERIALIZED_NAME_POD_I_PS = "podIPs"; @SerializedName(SERIALIZED_NAME_POD_I_PS) - private List podIPs; + private List podIPs = new ArrayList<>(); public static final String SERIALIZED_NAME_QOS_CLASS = "qosClass"; @SerializedName(SERIALIZED_NAME_QOS_CLASS) @@ -117,7 +117,7 @@ public class V1PodStatus { public static final String SERIALIZED_NAME_RESOURCE_CLAIM_STATUSES = "resourceClaimStatuses"; @SerializedName(SERIALIZED_NAME_RESOURCE_CLAIM_STATUSES) - private List resourceClaimStatuses; + private List resourceClaimStatuses = new ArrayList<>(); public static final String SERIALIZED_NAME_START_TIME = "startTime"; @SerializedName(SERIALIZED_NAME_START_TIME) @@ -127,7 +127,6 @@ public V1PodStatus() { } public V1PodStatus conditions(List conditions) { - this.conditions = conditions; return this; } @@ -149,14 +148,12 @@ public List getConditions() { return conditions; } - public void setConditions(List conditions) { this.conditions = conditions; } public V1PodStatus containerStatuses(List containerStatuses) { - this.containerStatuses = containerStatuses; return this; } @@ -178,14 +175,12 @@ public List getContainerStatuses() { return containerStatuses; } - public void setContainerStatuses(List containerStatuses) { this.containerStatuses = containerStatuses; } public V1PodStatus ephemeralContainerStatuses(List ephemeralContainerStatuses) { - this.ephemeralContainerStatuses = ephemeralContainerStatuses; return this; } @@ -207,14 +202,12 @@ public List getEphemeralContainerStatuses() { return ephemeralContainerStatuses; } - public void setEphemeralContainerStatuses(List ephemeralContainerStatuses) { this.ephemeralContainerStatuses = ephemeralContainerStatuses; } public V1PodStatus hostIP(String hostIP) { - this.hostIP = hostIP; return this; } @@ -228,14 +221,12 @@ public String getHostIP() { return hostIP; } - public void setHostIP(String hostIP) { this.hostIP = hostIP; } public V1PodStatus hostIPs(List hostIPs) { - this.hostIPs = hostIPs; return this; } @@ -257,14 +248,12 @@ public List getHostIPs() { return hostIPs; } - public void setHostIPs(List hostIPs) { this.hostIPs = hostIPs; } public V1PodStatus initContainerStatuses(List initContainerStatuses) { - this.initContainerStatuses = initContainerStatuses; return this; } @@ -286,14 +275,12 @@ public List getInitContainerStatuses() { return initContainerStatuses; } - public void setInitContainerStatuses(List initContainerStatuses) { this.initContainerStatuses = initContainerStatuses; } public V1PodStatus message(String message) { - this.message = message; return this; } @@ -307,14 +294,12 @@ public String getMessage() { return message; } - public void setMessage(String message) { this.message = message; } public V1PodStatus nominatedNodeName(String nominatedNodeName) { - this.nominatedNodeName = nominatedNodeName; return this; } @@ -328,14 +313,12 @@ public String getNominatedNodeName() { return nominatedNodeName; } - public void setNominatedNodeName(String nominatedNodeName) { this.nominatedNodeName = nominatedNodeName; } public V1PodStatus phase(String phase) { - this.phase = phase; return this; } @@ -349,14 +332,12 @@ public String getPhase() { return phase; } - public void setPhase(String phase) { this.phase = phase; } public V1PodStatus podIP(String podIP) { - this.podIP = podIP; return this; } @@ -370,14 +351,12 @@ public String getPodIP() { return podIP; } - public void setPodIP(String podIP) { this.podIP = podIP; } public V1PodStatus podIPs(List podIPs) { - this.podIPs = podIPs; return this; } @@ -399,14 +378,12 @@ public List getPodIPs() { return podIPs; } - public void setPodIPs(List podIPs) { this.podIPs = podIPs; } public V1PodStatus qosClass(String qosClass) { - this.qosClass = qosClass; return this; } @@ -420,14 +397,12 @@ public String getQosClass() { return qosClass; } - public void setQosClass(String qosClass) { this.qosClass = qosClass; } public V1PodStatus reason(String reason) { - this.reason = reason; return this; } @@ -441,14 +416,12 @@ public String getReason() { return reason; } - public void setReason(String reason) { this.reason = reason; } public V1PodStatus resize(String resize) { - this.resize = resize; return this; } @@ -462,14 +435,12 @@ public String getResize() { return resize; } - public void setResize(String resize) { this.resize = resize; } public V1PodStatus resourceClaimStatuses(List resourceClaimStatuses) { - this.resourceClaimStatuses = resourceClaimStatuses; return this; } @@ -491,14 +462,12 @@ public List getResourceClaimStatuses() { return resourceClaimStatuses; } - public void setResourceClaimStatuses(List resourceClaimStatuses) { this.resourceClaimStatuses = resourceClaimStatuses; } public V1PodStatus startTime(OffsetDateTime startTime) { - this.startTime = startTime; return this; } @@ -512,7 +481,6 @@ public OffsetDateTime getStartTime() { return startTime; } - public void setStartTime(OffsetDateTime startTime) { this.startTime = startTime; } @@ -615,25 +583,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1PodStatus + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1PodStatus */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1PodStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1PodStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1PodStatus is not found in the empty JSON string", V1PodStatus.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1PodStatus.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PodStatus` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PodStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (jsonObj.get("conditions") != null && !jsonObj.get("conditions").isJsonNull()) { JsonArray jsonArrayconditions = jsonObj.getAsJsonArray("conditions"); if (jsonArrayconditions != null) { @@ -644,7 +613,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `conditions` (array) for (int i = 0; i < jsonArrayconditions.size(); i++) { - V1PodCondition.validateJsonObject(jsonArrayconditions.get(i).getAsJsonObject()); + V1PodCondition.validateJsonElement(jsonArrayconditions.get(i)); }; } } @@ -658,7 +627,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `containerStatuses` (array) for (int i = 0; i < jsonArraycontainerStatuses.size(); i++) { - V1ContainerStatus.validateJsonObject(jsonArraycontainerStatuses.get(i).getAsJsonObject()); + V1ContainerStatus.validateJsonElement(jsonArraycontainerStatuses.get(i)); }; } } @@ -672,7 +641,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `ephemeralContainerStatuses` (array) for (int i = 0; i < jsonArrayephemeralContainerStatuses.size(); i++) { - V1ContainerStatus.validateJsonObject(jsonArrayephemeralContainerStatuses.get(i).getAsJsonObject()); + V1ContainerStatus.validateJsonElement(jsonArrayephemeralContainerStatuses.get(i)); }; } } @@ -689,7 +658,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `hostIPs` (array) for (int i = 0; i < jsonArrayhostIPs.size(); i++) { - V1HostIP.validateJsonObject(jsonArrayhostIPs.get(i).getAsJsonObject()); + V1HostIP.validateJsonElement(jsonArrayhostIPs.get(i)); }; } } @@ -703,7 +672,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `initContainerStatuses` (array) for (int i = 0; i < jsonArrayinitContainerStatuses.size(); i++) { - V1ContainerStatus.validateJsonObject(jsonArrayinitContainerStatuses.get(i).getAsJsonObject()); + V1ContainerStatus.validateJsonElement(jsonArrayinitContainerStatuses.get(i)); }; } } @@ -729,7 +698,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `podIPs` (array) for (int i = 0; i < jsonArraypodIPs.size(); i++) { - V1PodIP.validateJsonObject(jsonArraypodIPs.get(i).getAsJsonObject()); + V1PodIP.validateJsonElement(jsonArraypodIPs.get(i)); }; } } @@ -752,7 +721,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `resourceClaimStatuses` (array) for (int i = 0; i < jsonArrayresourceClaimStatuses.size(); i++) { - V1PodResourceClaimStatus.validateJsonObject(jsonArrayresourceClaimStatuses.get(i).getAsJsonObject()); + V1PodResourceClaimStatus.validateJsonElement(jsonArrayresourceClaimStatuses.get(i)); }; } } @@ -778,9 +747,9 @@ public void write(JsonWriter out, V1PodStatus value) throws IOException { @Override public V1PodStatus read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -807,3 +776,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodTemplate.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodTemplate.java index 252704a881..8a7d539270 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodTemplate.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodTemplate.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1ObjectMeta; import io.kubernetes.client.openapi.models.V1PodTemplateSpec; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -43,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -51,7 +51,7 @@ /** * PodTemplate describes a template for creating copies of a predefined pod. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1PodTemplate implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -73,7 +73,6 @@ public V1PodTemplate() { } public V1PodTemplate apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -87,14 +86,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1PodTemplate kind(String kind) { - this.kind = kind; return this; } @@ -108,14 +105,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1PodTemplate metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -129,14 +124,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V1PodTemplate template(V1PodTemplateSpec template) { - this.template = template; return this; } @@ -150,7 +143,6 @@ public V1PodTemplateSpec getTemplate() { return template; } - public void setTemplate(V1PodTemplateSpec template) { this.template = template; } @@ -217,25 +209,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1PodTemplate + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1PodTemplate */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1PodTemplate.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1PodTemplate.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1PodTemplate is not found in the empty JSON string", V1PodTemplate.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1PodTemplate.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PodTemplate` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PodTemplate` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -244,11 +237,11 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } // validate the optional field `template` if (jsonObj.get("template") != null && !jsonObj.get("template").isJsonNull()) { - V1PodTemplateSpec.validateJsonObject(jsonObj.getAsJsonObject("template")); + V1PodTemplateSpec.validateJsonElement(jsonObj.get("template")); } } @@ -272,9 +265,9 @@ public void write(JsonWriter out, V1PodTemplate value) throws IOException { @Override public V1PodTemplate read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -301,3 +294,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodTemplateList.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodTemplateList.java index 61adfcf304..b1a7c1ddcc 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodTemplateList.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodTemplateList.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1PodTemplate; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * PodTemplateList is a list of PodTemplates. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1PodTemplateList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -75,7 +75,6 @@ public V1PodTemplateList() { } public V1PodTemplateList apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -89,14 +88,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1PodTemplateList items(List items) { - this.items = items; return this; } @@ -118,14 +115,12 @@ public List getItems() { return items; } - public void setItems(List items) { this.items = items; } public V1PodTemplateList kind(String kind) { - this.kind = kind; return this; } @@ -139,14 +134,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1PodTemplateList metadata(V1ListMeta metadata) { - this.metadata = metadata; return this; } @@ -160,7 +153,6 @@ public V1ListMeta getMetadata() { return metadata; } - public void setMetadata(V1ListMeta metadata) { this.metadata = metadata; } @@ -228,32 +220,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1PodTemplateList + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1PodTemplateList */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1PodTemplateList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1PodTemplateList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1PodTemplateList is not found in the empty JSON string", V1PodTemplateList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1PodTemplateList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PodTemplateList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PodTemplateList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1PodTemplateList.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -265,14 +258,14 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); // validate the required field `items` (array) for (int i = 0; i < jsonArrayitems.size(); i++) { - V1PodTemplate.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject()); + V1PodTemplate.validateJsonElement(jsonArrayitems.get(i)); }; if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ListMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ListMeta.validateJsonElement(jsonObj.get("metadata")); } } @@ -296,9 +289,9 @@ public void write(JsonWriter out, V1PodTemplateList value) throws IOException { @Override public V1PodTemplateList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -325,3 +318,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodTemplateSpec.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodTemplateSpec.java index e5db025e1f..48a6f29929 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodTemplateSpec.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodTemplateSpec.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1ObjectMeta; import io.kubernetes.client.openapi.models.V1PodSpec; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -43,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -51,7 +51,7 @@ /** * PodTemplateSpec describes the data a pod should have when created from a template */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1PodTemplateSpec { public static final String SERIALIZED_NAME_METADATA = "metadata"; @SerializedName(SERIALIZED_NAME_METADATA) @@ -65,7 +65,6 @@ public V1PodTemplateSpec() { } public V1PodTemplateSpec metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -79,14 +78,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V1PodTemplateSpec spec(V1PodSpec spec) { - this.spec = spec; return this; } @@ -100,7 +97,6 @@ public V1PodSpec getSpec() { return spec; } - public void setSpec(V1PodSpec spec) { this.spec = spec; } @@ -161,32 +157,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1PodTemplateSpec + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1PodTemplateSpec */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1PodTemplateSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1PodTemplateSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1PodTemplateSpec is not found in the empty JSON string", V1PodTemplateSpec.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1PodTemplateSpec.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PodTemplateSpec` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PodTemplateSpec` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } // validate the optional field `spec` if (jsonObj.get("spec") != null && !jsonObj.get("spec").isJsonNull()) { - V1PodSpec.validateJsonObject(jsonObj.getAsJsonObject("spec")); + V1PodSpec.validateJsonElement(jsonObj.get("spec")); } } @@ -210,9 +207,9 @@ public void write(JsonWriter out, V1PodTemplateSpec value) throws IOException { @Override public V1PodTemplateSpec read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -239,3 +236,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PolicyRule.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PolicyRule.java index 6b87eeba58..a3f3fb0eb9 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PolicyRule.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PolicyRule.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -43,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -51,23 +51,23 @@ /** * 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. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1PolicyRule { public static final String SERIALIZED_NAME_API_GROUPS = "apiGroups"; @SerializedName(SERIALIZED_NAME_API_GROUPS) - private List apiGroups; + private List apiGroups = new ArrayList<>(); public static final String SERIALIZED_NAME_NON_RESOURCE_U_R_LS = "nonResourceURLs"; @SerializedName(SERIALIZED_NAME_NON_RESOURCE_U_R_LS) - private List nonResourceURLs; + private List nonResourceURLs = new ArrayList<>(); public static final String SERIALIZED_NAME_RESOURCE_NAMES = "resourceNames"; @SerializedName(SERIALIZED_NAME_RESOURCE_NAMES) - private List resourceNames; + private List resourceNames = new ArrayList<>(); public static final String SERIALIZED_NAME_RESOURCES = "resources"; @SerializedName(SERIALIZED_NAME_RESOURCES) - private List resources; + private List resources = new ArrayList<>(); public static final String SERIALIZED_NAME_VERBS = "verbs"; @SerializedName(SERIALIZED_NAME_VERBS) @@ -77,7 +77,6 @@ public V1PolicyRule() { } public V1PolicyRule apiGroups(List apiGroups) { - this.apiGroups = apiGroups; return this; } @@ -99,14 +98,12 @@ public List getApiGroups() { return apiGroups; } - public void setApiGroups(List apiGroups) { this.apiGroups = apiGroups; } public V1PolicyRule nonResourceURLs(List nonResourceURLs) { - this.nonResourceURLs = nonResourceURLs; return this; } @@ -128,14 +125,12 @@ public List getNonResourceURLs() { return nonResourceURLs; } - public void setNonResourceURLs(List nonResourceURLs) { this.nonResourceURLs = nonResourceURLs; } public V1PolicyRule resourceNames(List resourceNames) { - this.resourceNames = resourceNames; return this; } @@ -157,14 +152,12 @@ public List getResourceNames() { return resourceNames; } - public void setResourceNames(List resourceNames) { this.resourceNames = resourceNames; } public V1PolicyRule resources(List resources) { - this.resources = resources; return this; } @@ -186,14 +179,12 @@ public List getResources() { return resources; } - public void setResources(List resources) { this.resources = resources; } public V1PolicyRule verbs(List verbs) { - this.verbs = verbs; return this; } @@ -215,7 +206,6 @@ public List getVerbs() { return verbs; } - public void setVerbs(List verbs) { this.verbs = verbs; } @@ -286,46 +276,47 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1PolicyRule + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1PolicyRule */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1PolicyRule.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1PolicyRule.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1PolicyRule is not found in the empty JSON string", V1PolicyRule.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1PolicyRule.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PolicyRule` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PolicyRule` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1PolicyRule.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the optional json data is an array if present - if (jsonObj.get("apiGroups") != null && !jsonObj.get("apiGroups").isJsonArray()) { + if (jsonObj.get("apiGroups") != null && !jsonObj.get("apiGroups").isJsonNull() && !jsonObj.get("apiGroups").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `apiGroups` to be an array in the JSON string but got `%s`", jsonObj.get("apiGroups").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("nonResourceURLs") != null && !jsonObj.get("nonResourceURLs").isJsonArray()) { + if (jsonObj.get("nonResourceURLs") != null && !jsonObj.get("nonResourceURLs").isJsonNull() && !jsonObj.get("nonResourceURLs").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `nonResourceURLs` to be an array in the JSON string but got `%s`", jsonObj.get("nonResourceURLs").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("resourceNames") != null && !jsonObj.get("resourceNames").isJsonArray()) { + if (jsonObj.get("resourceNames") != null && !jsonObj.get("resourceNames").isJsonNull() && !jsonObj.get("resourceNames").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `resourceNames` to be an array in the JSON string but got `%s`", jsonObj.get("resourceNames").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("resources") != null && !jsonObj.get("resources").isJsonArray()) { + if (jsonObj.get("resources") != null && !jsonObj.get("resources").isJsonNull() && !jsonObj.get("resources").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `resources` to be an array in the JSON string but got `%s`", jsonObj.get("resources").toString())); } // ensure the required json array is present @@ -356,9 +347,9 @@ public void write(JsonWriter out, V1PolicyRule value) throws IOException { @Override public V1PolicyRule read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -385,3 +376,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PolicyRulesWithSubjects.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PolicyRulesWithSubjects.java index 2491a1a360..f112491dba 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PolicyRulesWithSubjects.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PolicyRulesWithSubjects.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -24,6 +24,7 @@ import io.kubernetes.client.openapi.models.V1ResourcePolicyRule; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -46,7 +47,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -54,15 +54,15 @@ /** * PolicyRulesWithSubjects prescribes a test that applies to a request to an apiserver. The test considers the subject making the request, the verb being requested, and the resource to be acted upon. This PolicyRulesWithSubjects matches a request if and only if both (a) at least one member of subjects matches the request and (b) at least one member of resourceRules or nonResourceRules matches the request. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1PolicyRulesWithSubjects { public static final String SERIALIZED_NAME_NON_RESOURCE_RULES = "nonResourceRules"; @SerializedName(SERIALIZED_NAME_NON_RESOURCE_RULES) - private List nonResourceRules; + private List nonResourceRules = new ArrayList<>(); public static final String SERIALIZED_NAME_RESOURCE_RULES = "resourceRules"; @SerializedName(SERIALIZED_NAME_RESOURCE_RULES) - private List resourceRules; + private List resourceRules = new ArrayList<>(); public static final String SERIALIZED_NAME_SUBJECTS = "subjects"; @SerializedName(SERIALIZED_NAME_SUBJECTS) @@ -72,7 +72,6 @@ public V1PolicyRulesWithSubjects() { } public V1PolicyRulesWithSubjects nonResourceRules(List nonResourceRules) { - this.nonResourceRules = nonResourceRules; return this; } @@ -94,14 +93,12 @@ public List getNonResourceRules() { return nonResourceRules; } - public void setNonResourceRules(List nonResourceRules) { this.nonResourceRules = nonResourceRules; } public V1PolicyRulesWithSubjects resourceRules(List resourceRules) { - this.resourceRules = resourceRules; return this; } @@ -123,14 +120,12 @@ public List getResourceRules() { return resourceRules; } - public void setResourceRules(List resourceRules) { this.resourceRules = resourceRules; } public V1PolicyRulesWithSubjects subjects(List subjects) { - this.subjects = subjects; return this; } @@ -152,7 +147,6 @@ public List getSubjects() { return subjects; } - public void setSubjects(List subjects) { this.subjects = subjects; } @@ -217,32 +211,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1PolicyRulesWithSubjects + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1PolicyRulesWithSubjects */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1PolicyRulesWithSubjects.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1PolicyRulesWithSubjects.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1PolicyRulesWithSubjects is not found in the empty JSON string", V1PolicyRulesWithSubjects.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1PolicyRulesWithSubjects.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PolicyRulesWithSubjects` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PolicyRulesWithSubjects` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1PolicyRulesWithSubjects.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (jsonObj.get("nonResourceRules") != null && !jsonObj.get("nonResourceRules").isJsonNull()) { JsonArray jsonArraynonResourceRules = jsonObj.getAsJsonArray("nonResourceRules"); if (jsonArraynonResourceRules != null) { @@ -253,7 +248,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `nonResourceRules` (array) for (int i = 0; i < jsonArraynonResourceRules.size(); i++) { - V1NonResourcePolicyRule.validateJsonObject(jsonArraynonResourceRules.get(i).getAsJsonObject()); + V1NonResourcePolicyRule.validateJsonElement(jsonArraynonResourceRules.get(i)); }; } } @@ -267,7 +262,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `resourceRules` (array) for (int i = 0; i < jsonArrayresourceRules.size(); i++) { - V1ResourcePolicyRule.validateJsonObject(jsonArrayresourceRules.get(i).getAsJsonObject()); + V1ResourcePolicyRule.validateJsonElement(jsonArrayresourceRules.get(i)); }; } } @@ -279,7 +274,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArraysubjects = jsonObj.getAsJsonArray("subjects"); // validate the required field `subjects` (array) for (int i = 0; i < jsonArraysubjects.size(); i++) { - FlowcontrolV1Subject.validateJsonObject(jsonArraysubjects.get(i).getAsJsonObject()); + FlowcontrolV1Subject.validateJsonElement(jsonArraysubjects.get(i)); }; } @@ -303,9 +298,9 @@ public void write(JsonWriter out, V1PolicyRulesWithSubjects value) throws IOExce @Override public V1PolicyRulesWithSubjects read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -332,3 +327,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PortStatus.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PortStatus.java index 82398355f9..88c470f07b 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PortStatus.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PortStatus.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * V1PortStatus */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1PortStatus { public static final String SERIALIZED_NAME_ERROR = "error"; @SerializedName(SERIALIZED_NAME_ERROR) @@ -67,7 +67,6 @@ public V1PortStatus() { } public V1PortStatus error(String error) { - this.error = error; return this; } @@ -81,14 +80,12 @@ public String getError() { return error; } - public void setError(String error) { this.error = error; } public V1PortStatus port(Integer port) { - this.port = port; return this; } @@ -102,14 +99,12 @@ public Integer getPort() { return port; } - public void setPort(Integer port) { this.port = port; } public V1PortStatus protocol(String protocol) { - this.protocol = protocol; return this; } @@ -123,7 +118,6 @@ public String getProtocol() { return protocol; } - public void setProtocol(String protocol) { this.protocol = protocol; } @@ -189,32 +183,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1PortStatus + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1PortStatus */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1PortStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1PortStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1PortStatus is not found in the empty JSON string", V1PortStatus.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1PortStatus.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PortStatus` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PortStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1PortStatus.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("error") != null && !jsonObj.get("error").isJsonNull()) && !jsonObj.get("error").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `error` to be a primitive type in the JSON string but got `%s`", jsonObj.get("error").toString())); } @@ -243,9 +238,9 @@ public void write(JsonWriter out, V1PortStatus value) throws IOException { @Override public V1PortStatus read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -272,3 +267,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PortworxVolumeSource.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PortworxVolumeSource.java index c0a67c1504..dc02725a5a 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PortworxVolumeSource.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PortworxVolumeSource.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * PortworxVolumeSource represents a Portworx volume resource. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1PortworxVolumeSource { public static final String SERIALIZED_NAME_FS_TYPE = "fsType"; @SerializedName(SERIALIZED_NAME_FS_TYPE) @@ -67,7 +67,6 @@ public V1PortworxVolumeSource() { } public V1PortworxVolumeSource fsType(String fsType) { - this.fsType = fsType; return this; } @@ -81,14 +80,12 @@ public String getFsType() { return fsType; } - public void setFsType(String fsType) { this.fsType = fsType; } public V1PortworxVolumeSource readOnly(Boolean readOnly) { - this.readOnly = readOnly; return this; } @@ -102,14 +99,12 @@ public Boolean getReadOnly() { return readOnly; } - public void setReadOnly(Boolean readOnly) { this.readOnly = readOnly; } public V1PortworxVolumeSource volumeID(String volumeID) { - this.volumeID = volumeID; return this; } @@ -123,7 +118,6 @@ public String getVolumeID() { return volumeID; } - public void setVolumeID(String volumeID) { this.volumeID = volumeID; } @@ -188,32 +182,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1PortworxVolumeSource + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1PortworxVolumeSource */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1PortworxVolumeSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1PortworxVolumeSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1PortworxVolumeSource is not found in the empty JSON string", V1PortworxVolumeSource.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1PortworxVolumeSource.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PortworxVolumeSource` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PortworxVolumeSource` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1PortworxVolumeSource.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("fsType") != null && !jsonObj.get("fsType").isJsonNull()) && !jsonObj.get("fsType").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `fsType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fsType").toString())); } @@ -242,9 +237,9 @@ public void write(JsonWriter out, V1PortworxVolumeSource value) throws IOExcepti @Override public V1PortworxVolumeSource read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -271,3 +266,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Preconditions.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Preconditions.java index b034d8a1c1..adec08c163 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Preconditions.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Preconditions.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1Preconditions { public static final String SERIALIZED_NAME_RESOURCE_VERSION = "resourceVersion"; @SerializedName(SERIALIZED_NAME_RESOURCE_VERSION) @@ -63,7 +63,6 @@ public V1Preconditions() { } public V1Preconditions resourceVersion(String resourceVersion) { - this.resourceVersion = resourceVersion; return this; } @@ -77,14 +76,12 @@ public String getResourceVersion() { return resourceVersion; } - public void setResourceVersion(String resourceVersion) { this.resourceVersion = resourceVersion; } public V1Preconditions uid(String uid) { - this.uid = uid; return this; } @@ -98,7 +95,6 @@ public String getUid() { return uid; } - public void setUid(String uid) { this.uid = uid; } @@ -159,25 +155,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1Preconditions + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1Preconditions */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1Preconditions.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1Preconditions.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1Preconditions is not found in the empty JSON string", V1Preconditions.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1Preconditions.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1Preconditions` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1Preconditions` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("resourceVersion") != null && !jsonObj.get("resourceVersion").isJsonNull()) && !jsonObj.get("resourceVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `resourceVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("resourceVersion").toString())); } @@ -206,9 +203,9 @@ public void write(JsonWriter out, V1Preconditions value) throws IOException { @Override public V1Preconditions read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -235,3 +232,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PreferredSchedulingTerm.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PreferredSchedulingTerm.java index 1b17be27cd..fcd950392e 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PreferredSchedulingTerm.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PreferredSchedulingTerm.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.openapi.models.V1NodeSelectorTerm; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * 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). */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1PreferredSchedulingTerm { public static final String SERIALIZED_NAME_PREFERENCE = "preference"; @SerializedName(SERIALIZED_NAME_PREFERENCE) @@ -64,7 +64,6 @@ public V1PreferredSchedulingTerm() { } public V1PreferredSchedulingTerm preference(V1NodeSelectorTerm preference) { - this.preference = preference; return this; } @@ -78,14 +77,12 @@ public V1NodeSelectorTerm getPreference() { return preference; } - public void setPreference(V1NodeSelectorTerm preference) { this.preference = preference; } public V1PreferredSchedulingTerm weight(Integer weight) { - this.weight = weight; return this; } @@ -99,7 +96,6 @@ public Integer getWeight() { return weight; } - public void setWeight(Integer weight) { this.weight = weight; } @@ -162,34 +158,35 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1PreferredSchedulingTerm + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1PreferredSchedulingTerm */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1PreferredSchedulingTerm.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1PreferredSchedulingTerm.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1PreferredSchedulingTerm is not found in the empty JSON string", V1PreferredSchedulingTerm.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1PreferredSchedulingTerm.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PreferredSchedulingTerm` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PreferredSchedulingTerm` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1PreferredSchedulingTerm.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the required field `preference` - V1NodeSelectorTerm.validateJsonObject(jsonObj.getAsJsonObject("preference")); + V1NodeSelectorTerm.validateJsonElement(jsonObj.get("preference")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -212,9 +209,9 @@ public void write(JsonWriter out, V1PreferredSchedulingTerm value) throws IOExce @Override public V1PreferredSchedulingTerm read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -241,3 +238,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PriorityClass.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PriorityClass.java index dc324d161b..e910d85abf 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PriorityClass.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PriorityClass.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.openapi.models.V1ObjectMeta; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * PriorityClass defines mapping from a priority class name to the priority integer value. The value can be any valid integer. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1PriorityClass implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -84,7 +84,6 @@ public V1PriorityClass() { } public V1PriorityClass apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -98,14 +97,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1PriorityClass description(String description) { - this.description = description; return this; } @@ -119,14 +116,12 @@ public String getDescription() { return description; } - public void setDescription(String description) { this.description = description; } public V1PriorityClass globalDefault(Boolean globalDefault) { - this.globalDefault = globalDefault; return this; } @@ -140,14 +135,12 @@ public Boolean getGlobalDefault() { return globalDefault; } - public void setGlobalDefault(Boolean globalDefault) { this.globalDefault = globalDefault; } public V1PriorityClass kind(String kind) { - this.kind = kind; return this; } @@ -161,14 +154,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1PriorityClass metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -182,14 +173,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V1PriorityClass preemptionPolicy(String preemptionPolicy) { - this.preemptionPolicy = preemptionPolicy; return this; } @@ -203,14 +192,12 @@ public String getPreemptionPolicy() { return preemptionPolicy; } - public void setPreemptionPolicy(String preemptionPolicy) { this.preemptionPolicy = preemptionPolicy; } public V1PriorityClass value(Integer value) { - this.value = value; return this; } @@ -224,7 +211,6 @@ public Integer getValue() { return value; } - public void setValue(Integer value) { this.value = value; } @@ -301,32 +287,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1PriorityClass + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1PriorityClass */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1PriorityClass.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1PriorityClass.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1PriorityClass is not found in the empty JSON string", V1PriorityClass.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1PriorityClass.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PriorityClass` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PriorityClass` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1PriorityClass.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -338,7 +325,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } if ((jsonObj.get("preemptionPolicy") != null && !jsonObj.get("preemptionPolicy").isJsonNull()) && !jsonObj.get("preemptionPolicy").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `preemptionPolicy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("preemptionPolicy").toString())); @@ -365,9 +352,9 @@ public void write(JsonWriter out, V1PriorityClass value) throws IOException { @Override public V1PriorityClass read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -394,3 +381,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PriorityClassList.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PriorityClassList.java index 9520109620..5a39e990b3 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PriorityClassList.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PriorityClassList.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1PriorityClass; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * PriorityClassList is a collection of priority classes. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1PriorityClassList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -75,7 +75,6 @@ public V1PriorityClassList() { } public V1PriorityClassList apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -89,14 +88,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1PriorityClassList items(List items) { - this.items = items; return this; } @@ -118,14 +115,12 @@ public List getItems() { return items; } - public void setItems(List items) { this.items = items; } public V1PriorityClassList kind(String kind) { - this.kind = kind; return this; } @@ -139,14 +134,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1PriorityClassList metadata(V1ListMeta metadata) { - this.metadata = metadata; return this; } @@ -160,7 +153,6 @@ public V1ListMeta getMetadata() { return metadata; } - public void setMetadata(V1ListMeta metadata) { this.metadata = metadata; } @@ -228,32 +220,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1PriorityClassList + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1PriorityClassList */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1PriorityClassList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1PriorityClassList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1PriorityClassList is not found in the empty JSON string", V1PriorityClassList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1PriorityClassList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PriorityClassList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PriorityClassList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1PriorityClassList.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -265,14 +258,14 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); // validate the required field `items` (array) for (int i = 0; i < jsonArrayitems.size(); i++) { - V1PriorityClass.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject()); + V1PriorityClass.validateJsonElement(jsonArrayitems.get(i)); }; if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ListMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ListMeta.validateJsonElement(jsonObj.get("metadata")); } } @@ -296,9 +289,9 @@ public void write(JsonWriter out, V1PriorityClassList value) throws IOException @Override public V1PriorityClassList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -325,3 +318,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PriorityLevelConfiguration.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PriorityLevelConfiguration.java index e052a7b59e..f6ade965e4 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PriorityLevelConfiguration.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PriorityLevelConfiguration.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1PriorityLevelConfigurationSpec; import io.kubernetes.client.openapi.models.V1PriorityLevelConfigurationStatus; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * PriorityLevelConfiguration represents the configuration of a priority level. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1PriorityLevelConfiguration implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -78,7 +78,6 @@ public V1PriorityLevelConfiguration() { } public V1PriorityLevelConfiguration apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -92,14 +91,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1PriorityLevelConfiguration kind(String kind) { - this.kind = kind; return this; } @@ -113,14 +110,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1PriorityLevelConfiguration metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -134,14 +129,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V1PriorityLevelConfiguration spec(V1PriorityLevelConfigurationSpec spec) { - this.spec = spec; return this; } @@ -155,14 +148,12 @@ public V1PriorityLevelConfigurationSpec getSpec() { return spec; } - public void setSpec(V1PriorityLevelConfigurationSpec spec) { this.spec = spec; } public V1PriorityLevelConfiguration status(V1PriorityLevelConfigurationStatus status) { - this.status = status; return this; } @@ -176,7 +167,6 @@ public V1PriorityLevelConfigurationStatus getStatus() { return status; } - public void setStatus(V1PriorityLevelConfigurationStatus status) { this.status = status; } @@ -246,25 +236,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1PriorityLevelConfiguration + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1PriorityLevelConfiguration */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1PriorityLevelConfiguration.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1PriorityLevelConfiguration.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1PriorityLevelConfiguration is not found in the empty JSON string", V1PriorityLevelConfiguration.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1PriorityLevelConfiguration.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PriorityLevelConfiguration` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PriorityLevelConfiguration` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -273,15 +264,15 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } // validate the optional field `spec` if (jsonObj.get("spec") != null && !jsonObj.get("spec").isJsonNull()) { - V1PriorityLevelConfigurationSpec.validateJsonObject(jsonObj.getAsJsonObject("spec")); + V1PriorityLevelConfigurationSpec.validateJsonElement(jsonObj.get("spec")); } // validate the optional field `status` if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { - V1PriorityLevelConfigurationStatus.validateJsonObject(jsonObj.getAsJsonObject("status")); + V1PriorityLevelConfigurationStatus.validateJsonElement(jsonObj.get("status")); } } @@ -305,9 +296,9 @@ public void write(JsonWriter out, V1PriorityLevelConfiguration value) throws IOE @Override public V1PriorityLevelConfiguration read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -334,3 +325,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PriorityLevelConfigurationCondition.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PriorityLevelConfigurationCondition.java index 67d565ca2f..68dea6db2b 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PriorityLevelConfigurationCondition.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PriorityLevelConfigurationCondition.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * PriorityLevelConfigurationCondition defines the condition of priority level. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1PriorityLevelConfigurationCondition { public static final String SERIALIZED_NAME_LAST_TRANSITION_TIME = "lastTransitionTime"; @SerializedName(SERIALIZED_NAME_LAST_TRANSITION_TIME) @@ -76,7 +76,6 @@ public V1PriorityLevelConfigurationCondition() { } public V1PriorityLevelConfigurationCondition lastTransitionTime(OffsetDateTime lastTransitionTime) { - this.lastTransitionTime = lastTransitionTime; return this; } @@ -90,14 +89,12 @@ public OffsetDateTime getLastTransitionTime() { return lastTransitionTime; } - public void setLastTransitionTime(OffsetDateTime lastTransitionTime) { this.lastTransitionTime = lastTransitionTime; } public V1PriorityLevelConfigurationCondition message(String message) { - this.message = message; return this; } @@ -111,14 +108,12 @@ public String getMessage() { return message; } - public void setMessage(String message) { this.message = message; } public V1PriorityLevelConfigurationCondition reason(String reason) { - this.reason = reason; return this; } @@ -132,14 +127,12 @@ public String getReason() { return reason; } - public void setReason(String reason) { this.reason = reason; } public V1PriorityLevelConfigurationCondition status(String status) { - this.status = status; return this; } @@ -153,14 +146,12 @@ public String getStatus() { return status; } - public void setStatus(String status) { this.status = status; } public V1PriorityLevelConfigurationCondition type(String type) { - this.type = type; return this; } @@ -174,7 +165,6 @@ public String getType() { return type; } - public void setType(String type) { this.type = type; } @@ -244,25 +234,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1PriorityLevelConfigurationCondition + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1PriorityLevelConfigurationCondition */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1PriorityLevelConfigurationCondition.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1PriorityLevelConfigurationCondition.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1PriorityLevelConfigurationCondition is not found in the empty JSON string", V1PriorityLevelConfigurationCondition.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1PriorityLevelConfigurationCondition.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PriorityLevelConfigurationCondition` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PriorityLevelConfigurationCondition` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); } @@ -297,9 +288,9 @@ public void write(JsonWriter out, V1PriorityLevelConfigurationCondition value) t @Override public V1PriorityLevelConfigurationCondition read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -326,3 +317,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PriorityLevelConfigurationList.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PriorityLevelConfigurationList.java index 76b72b1bcd..6643baedb6 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PriorityLevelConfigurationList.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PriorityLevelConfigurationList.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1PriorityLevelConfiguration; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * PriorityLevelConfigurationList is a list of PriorityLevelConfiguration objects. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1PriorityLevelConfigurationList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -75,7 +75,6 @@ public V1PriorityLevelConfigurationList() { } public V1PriorityLevelConfigurationList apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -89,14 +88,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1PriorityLevelConfigurationList items(List items) { - this.items = items; return this; } @@ -118,14 +115,12 @@ public List getItems() { return items; } - public void setItems(List items) { this.items = items; } public V1PriorityLevelConfigurationList kind(String kind) { - this.kind = kind; return this; } @@ -139,14 +134,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1PriorityLevelConfigurationList metadata(V1ListMeta metadata) { - this.metadata = metadata; return this; } @@ -160,7 +153,6 @@ public V1ListMeta getMetadata() { return metadata; } - public void setMetadata(V1ListMeta metadata) { this.metadata = metadata; } @@ -228,32 +220,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1PriorityLevelConfigurationList + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1PriorityLevelConfigurationList */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1PriorityLevelConfigurationList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1PriorityLevelConfigurationList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1PriorityLevelConfigurationList is not found in the empty JSON string", V1PriorityLevelConfigurationList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1PriorityLevelConfigurationList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PriorityLevelConfigurationList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PriorityLevelConfigurationList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1PriorityLevelConfigurationList.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -265,14 +258,14 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); // validate the required field `items` (array) for (int i = 0; i < jsonArrayitems.size(); i++) { - V1PriorityLevelConfiguration.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject()); + V1PriorityLevelConfiguration.validateJsonElement(jsonArrayitems.get(i)); }; if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ListMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ListMeta.validateJsonElement(jsonObj.get("metadata")); } } @@ -296,9 +289,9 @@ public void write(JsonWriter out, V1PriorityLevelConfigurationList value) throws @Override public V1PriorityLevelConfigurationList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -325,3 +318,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PriorityLevelConfigurationReference.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PriorityLevelConfigurationReference.java index 8dda7c7f1d..d049123970 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PriorityLevelConfigurationReference.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PriorityLevelConfigurationReference.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * PriorityLevelConfigurationReference contains information that points to the \"request-priority\" being used. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1PriorityLevelConfigurationReference { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) @@ -59,7 +59,6 @@ public V1PriorityLevelConfigurationReference() { } public V1PriorityLevelConfigurationReference name(String name) { - this.name = name; return this; } @@ -73,7 +72,6 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } @@ -132,32 +130,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1PriorityLevelConfigurationReference + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1PriorityLevelConfigurationReference */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1PriorityLevelConfigurationReference.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1PriorityLevelConfigurationReference.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1PriorityLevelConfigurationReference is not found in the empty JSON string", V1PriorityLevelConfigurationReference.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1PriorityLevelConfigurationReference.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PriorityLevelConfigurationReference` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PriorityLevelConfigurationReference` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1PriorityLevelConfigurationReference.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } @@ -183,9 +182,9 @@ public void write(JsonWriter out, V1PriorityLevelConfigurationReference value) t @Override public V1PriorityLevelConfigurationReference read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -212,3 +211,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PriorityLevelConfigurationSpec.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PriorityLevelConfigurationSpec.java index a8bafdcde2..207dcb3bd6 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PriorityLevelConfigurationSpec.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PriorityLevelConfigurationSpec.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1ExemptPriorityLevelConfiguration; import io.kubernetes.client.openapi.models.V1LimitedPriorityLevelConfiguration; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -43,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -51,7 +51,7 @@ /** * PriorityLevelConfigurationSpec specifies the configuration of a priority level. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1PriorityLevelConfigurationSpec { public static final String SERIALIZED_NAME_EXEMPT = "exempt"; @SerializedName(SERIALIZED_NAME_EXEMPT) @@ -69,7 +69,6 @@ public V1PriorityLevelConfigurationSpec() { } public V1PriorityLevelConfigurationSpec exempt(V1ExemptPriorityLevelConfiguration exempt) { - this.exempt = exempt; return this; } @@ -83,14 +82,12 @@ public V1ExemptPriorityLevelConfiguration getExempt() { return exempt; } - public void setExempt(V1ExemptPriorityLevelConfiguration exempt) { this.exempt = exempt; } public V1PriorityLevelConfigurationSpec limited(V1LimitedPriorityLevelConfiguration limited) { - this.limited = limited; return this; } @@ -104,14 +101,12 @@ public V1LimitedPriorityLevelConfiguration getLimited() { return limited; } - public void setLimited(V1LimitedPriorityLevelConfiguration limited) { this.limited = limited; } public V1PriorityLevelConfigurationSpec type(String type) { - this.type = type; return this; } @@ -125,7 +120,6 @@ public String getType() { return type; } - public void setType(String type) { this.type = type; } @@ -190,39 +184,40 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1PriorityLevelConfigurationSpec + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1PriorityLevelConfigurationSpec */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1PriorityLevelConfigurationSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1PriorityLevelConfigurationSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1PriorityLevelConfigurationSpec is not found in the empty JSON string", V1PriorityLevelConfigurationSpec.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1PriorityLevelConfigurationSpec.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PriorityLevelConfigurationSpec` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PriorityLevelConfigurationSpec` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1PriorityLevelConfigurationSpec.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `exempt` if (jsonObj.get("exempt") != null && !jsonObj.get("exempt").isJsonNull()) { - V1ExemptPriorityLevelConfiguration.validateJsonObject(jsonObj.getAsJsonObject("exempt")); + V1ExemptPriorityLevelConfiguration.validateJsonElement(jsonObj.get("exempt")); } // validate the optional field `limited` if (jsonObj.get("limited") != null && !jsonObj.get("limited").isJsonNull()) { - V1LimitedPriorityLevelConfiguration.validateJsonObject(jsonObj.getAsJsonObject("limited")); + V1LimitedPriorityLevelConfiguration.validateJsonElement(jsonObj.get("limited")); } if (!jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); @@ -249,9 +244,9 @@ public void write(JsonWriter out, V1PriorityLevelConfigurationSpec value) throws @Override public V1PriorityLevelConfigurationSpec read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -278,3 +273,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PriorityLevelConfigurationStatus.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PriorityLevelConfigurationStatus.java index b4543d573e..13010f0eda 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PriorityLevelConfigurationStatus.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PriorityLevelConfigurationStatus.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1PriorityLevelConfigurationCondition; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,17 +52,16 @@ /** * PriorityLevelConfigurationStatus represents the current state of a \"request-priority\". */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1PriorityLevelConfigurationStatus { public static final String SERIALIZED_NAME_CONDITIONS = "conditions"; @SerializedName(SERIALIZED_NAME_CONDITIONS) - private List conditions; + private List conditions = new ArrayList<>(); public V1PriorityLevelConfigurationStatus() { } public V1PriorityLevelConfigurationStatus conditions(List conditions) { - this.conditions = conditions; return this; } @@ -84,7 +83,6 @@ public List getConditions() { return conditions; } - public void setConditions(List conditions) { this.conditions = conditions; } @@ -142,25 +140,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1PriorityLevelConfigurationStatus + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1PriorityLevelConfigurationStatus */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1PriorityLevelConfigurationStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1PriorityLevelConfigurationStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1PriorityLevelConfigurationStatus is not found in the empty JSON string", V1PriorityLevelConfigurationStatus.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1PriorityLevelConfigurationStatus.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PriorityLevelConfigurationStatus` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1PriorityLevelConfigurationStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (jsonObj.get("conditions") != null && !jsonObj.get("conditions").isJsonNull()) { JsonArray jsonArrayconditions = jsonObj.getAsJsonArray("conditions"); if (jsonArrayconditions != null) { @@ -171,7 +170,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `conditions` (array) for (int i = 0; i < jsonArrayconditions.size(); i++) { - V1PriorityLevelConfigurationCondition.validateJsonObject(jsonArrayconditions.get(i).getAsJsonObject()); + V1PriorityLevelConfigurationCondition.validateJsonElement(jsonArrayconditions.get(i)); }; } } @@ -197,9 +196,9 @@ public void write(JsonWriter out, V1PriorityLevelConfigurationStatus value) thro @Override public V1PriorityLevelConfigurationStatus read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -226,3 +225,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Probe.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Probe.java index 3ced7f1a7b..741e1adbe1 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Probe.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Probe.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -24,6 +24,7 @@ import io.kubernetes.client.openapi.models.V1HTTPGetAction; import io.kubernetes.client.openapi.models.V1TCPSocketAction; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1Probe { public static final String SERIALIZED_NAME_EXEC = "exec"; @SerializedName(SERIALIZED_NAME_EXEC) @@ -99,7 +99,6 @@ public V1Probe() { } public V1Probe exec(V1ExecAction exec) { - this.exec = exec; return this; } @@ -113,14 +112,12 @@ public V1ExecAction getExec() { return exec; } - public void setExec(V1ExecAction exec) { this.exec = exec; } public V1Probe failureThreshold(Integer failureThreshold) { - this.failureThreshold = failureThreshold; return this; } @@ -134,14 +131,12 @@ public Integer getFailureThreshold() { return failureThreshold; } - public void setFailureThreshold(Integer failureThreshold) { this.failureThreshold = failureThreshold; } public V1Probe grpc(V1GRPCAction grpc) { - this.grpc = grpc; return this; } @@ -155,14 +150,12 @@ public V1GRPCAction getGrpc() { return grpc; } - public void setGrpc(V1GRPCAction grpc) { this.grpc = grpc; } public V1Probe httpGet(V1HTTPGetAction httpGet) { - this.httpGet = httpGet; return this; } @@ -176,14 +169,12 @@ public V1HTTPGetAction getHttpGet() { return httpGet; } - public void setHttpGet(V1HTTPGetAction httpGet) { this.httpGet = httpGet; } public V1Probe initialDelaySeconds(Integer initialDelaySeconds) { - this.initialDelaySeconds = initialDelaySeconds; return this; } @@ -197,14 +188,12 @@ public Integer getInitialDelaySeconds() { return initialDelaySeconds; } - public void setInitialDelaySeconds(Integer initialDelaySeconds) { this.initialDelaySeconds = initialDelaySeconds; } public V1Probe periodSeconds(Integer periodSeconds) { - this.periodSeconds = periodSeconds; return this; } @@ -218,14 +207,12 @@ public Integer getPeriodSeconds() { return periodSeconds; } - public void setPeriodSeconds(Integer periodSeconds) { this.periodSeconds = periodSeconds; } public V1Probe successThreshold(Integer successThreshold) { - this.successThreshold = successThreshold; return this; } @@ -239,14 +226,12 @@ public Integer getSuccessThreshold() { return successThreshold; } - public void setSuccessThreshold(Integer successThreshold) { this.successThreshold = successThreshold; } public V1Probe tcpSocket(V1TCPSocketAction tcpSocket) { - this.tcpSocket = tcpSocket; return this; } @@ -260,14 +245,12 @@ public V1TCPSocketAction getTcpSocket() { return tcpSocket; } - public void setTcpSocket(V1TCPSocketAction tcpSocket) { this.tcpSocket = tcpSocket; } public V1Probe terminationGracePeriodSeconds(Long terminationGracePeriodSeconds) { - this.terminationGracePeriodSeconds = terminationGracePeriodSeconds; return this; } @@ -281,14 +264,12 @@ public Long getTerminationGracePeriodSeconds() { return terminationGracePeriodSeconds; } - public void setTerminationGracePeriodSeconds(Long terminationGracePeriodSeconds) { this.terminationGracePeriodSeconds = terminationGracePeriodSeconds; } public V1Probe timeoutSeconds(Integer timeoutSeconds) { - this.timeoutSeconds = timeoutSeconds; return this; } @@ -302,7 +283,6 @@ public Integer getTimeoutSeconds() { return timeoutSeconds; } - public void setTimeoutSeconds(Integer timeoutSeconds) { this.timeoutSeconds = timeoutSeconds; } @@ -387,40 +367,41 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1Probe + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1Probe */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1Probe.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1Probe.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1Probe is not found in the empty JSON string", V1Probe.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1Probe.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1Probe` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1Probe` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `exec` if (jsonObj.get("exec") != null && !jsonObj.get("exec").isJsonNull()) { - V1ExecAction.validateJsonObject(jsonObj.getAsJsonObject("exec")); + V1ExecAction.validateJsonElement(jsonObj.get("exec")); } // validate the optional field `grpc` if (jsonObj.get("grpc") != null && !jsonObj.get("grpc").isJsonNull()) { - V1GRPCAction.validateJsonObject(jsonObj.getAsJsonObject("grpc")); + V1GRPCAction.validateJsonElement(jsonObj.get("grpc")); } // validate the optional field `httpGet` if (jsonObj.get("httpGet") != null && !jsonObj.get("httpGet").isJsonNull()) { - V1HTTPGetAction.validateJsonObject(jsonObj.getAsJsonObject("httpGet")); + V1HTTPGetAction.validateJsonElement(jsonObj.get("httpGet")); } // validate the optional field `tcpSocket` if (jsonObj.get("tcpSocket") != null && !jsonObj.get("tcpSocket").isJsonNull()) { - V1TCPSocketAction.validateJsonObject(jsonObj.getAsJsonObject("tcpSocket")); + V1TCPSocketAction.validateJsonElement(jsonObj.get("tcpSocket")); } } @@ -444,9 +425,9 @@ public void write(JsonWriter out, V1Probe value) throws IOException { @Override public V1Probe read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -473,3 +454,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ProjectedVolumeSource.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ProjectedVolumeSource.java index 3a3a45845e..cf32c87569 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ProjectedVolumeSource.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ProjectedVolumeSource.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1VolumeProjection; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * Represents a projected volume source */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ProjectedVolumeSource { public static final String SERIALIZED_NAME_DEFAULT_MODE = "defaultMode"; @SerializedName(SERIALIZED_NAME_DEFAULT_MODE) @@ -60,13 +60,12 @@ public class V1ProjectedVolumeSource { public static final String SERIALIZED_NAME_SOURCES = "sources"; @SerializedName(SERIALIZED_NAME_SOURCES) - private List sources; + private List sources = new ArrayList<>(); public V1ProjectedVolumeSource() { } public V1ProjectedVolumeSource defaultMode(Integer defaultMode) { - this.defaultMode = defaultMode; return this; } @@ -80,14 +79,12 @@ public Integer getDefaultMode() { return defaultMode; } - public void setDefaultMode(Integer defaultMode) { this.defaultMode = defaultMode; } public V1ProjectedVolumeSource sources(List sources) { - this.sources = sources; return this; } @@ -109,7 +106,6 @@ public List getSources() { return sources; } - public void setSources(List sources) { this.sources = sources; } @@ -170,25 +166,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ProjectedVolumeSource + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ProjectedVolumeSource */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ProjectedVolumeSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ProjectedVolumeSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ProjectedVolumeSource is not found in the empty JSON string", V1ProjectedVolumeSource.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ProjectedVolumeSource.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ProjectedVolumeSource` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ProjectedVolumeSource` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (jsonObj.get("sources") != null && !jsonObj.get("sources").isJsonNull()) { JsonArray jsonArraysources = jsonObj.getAsJsonArray("sources"); if (jsonArraysources != null) { @@ -199,7 +196,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `sources` (array) for (int i = 0; i < jsonArraysources.size(); i++) { - V1VolumeProjection.validateJsonObject(jsonArraysources.get(i).getAsJsonObject()); + V1VolumeProjection.validateJsonElement(jsonArraysources.get(i)); }; } } @@ -225,9 +222,9 @@ public void write(JsonWriter out, V1ProjectedVolumeSource value) throws IOExcept @Override public V1ProjectedVolumeSource read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -254,3 +251,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1QueuingConfiguration.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1QueuingConfiguration.java index d46da25183..9f73973a69 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1QueuingConfiguration.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1QueuingConfiguration.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * QueuingConfiguration holds the configuration parameters for queuing */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1QueuingConfiguration { public static final String SERIALIZED_NAME_HAND_SIZE = "handSize"; @SerializedName(SERIALIZED_NAME_HAND_SIZE) @@ -67,7 +67,6 @@ public V1QueuingConfiguration() { } public V1QueuingConfiguration handSize(Integer handSize) { - this.handSize = handSize; return this; } @@ -81,14 +80,12 @@ public Integer getHandSize() { return handSize; } - public void setHandSize(Integer handSize) { this.handSize = handSize; } public V1QueuingConfiguration queueLengthLimit(Integer queueLengthLimit) { - this.queueLengthLimit = queueLengthLimit; return this; } @@ -102,14 +99,12 @@ public Integer getQueueLengthLimit() { return queueLengthLimit; } - public void setQueueLengthLimit(Integer queueLengthLimit) { this.queueLengthLimit = queueLengthLimit; } public V1QueuingConfiguration queues(Integer queues) { - this.queues = queues; return this; } @@ -123,7 +118,6 @@ public Integer getQueues() { return queues; } - public void setQueues(Integer queues) { this.queues = queues; } @@ -187,25 +181,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1QueuingConfiguration + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1QueuingConfiguration */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1QueuingConfiguration.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1QueuingConfiguration.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1QueuingConfiguration is not found in the empty JSON string", V1QueuingConfiguration.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1QueuingConfiguration.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1QueuingConfiguration` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1QueuingConfiguration` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -228,9 +223,9 @@ public void write(JsonWriter out, V1QueuingConfiguration value) throws IOExcepti @Override public V1QueuingConfiguration read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -257,3 +252,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1QuobyteVolumeSource.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1QuobyteVolumeSource.java index 1cb83676e6..513b68fb76 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1QuobyteVolumeSource.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1QuobyteVolumeSource.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * Represents a Quobyte mount that lasts the lifetime of a pod. Quobyte volumes do not support ownership management or SELinux relabeling. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1QuobyteVolumeSource { public static final String SERIALIZED_NAME_GROUP = "group"; @SerializedName(SERIALIZED_NAME_GROUP) @@ -79,7 +79,6 @@ public V1QuobyteVolumeSource() { } public V1QuobyteVolumeSource group(String group) { - this.group = group; return this; } @@ -93,14 +92,12 @@ public String getGroup() { return group; } - public void setGroup(String group) { this.group = group; } public V1QuobyteVolumeSource readOnly(Boolean readOnly) { - this.readOnly = readOnly; return this; } @@ -114,14 +111,12 @@ public Boolean getReadOnly() { return readOnly; } - public void setReadOnly(Boolean readOnly) { this.readOnly = readOnly; } public V1QuobyteVolumeSource registry(String registry) { - this.registry = registry; return this; } @@ -135,14 +130,12 @@ public String getRegistry() { return registry; } - public void setRegistry(String registry) { this.registry = registry; } public V1QuobyteVolumeSource tenant(String tenant) { - this.tenant = tenant; return this; } @@ -156,14 +149,12 @@ public String getTenant() { return tenant; } - public void setTenant(String tenant) { this.tenant = tenant; } public V1QuobyteVolumeSource user(String user) { - this.user = user; return this; } @@ -177,14 +168,12 @@ public String getUser() { return user; } - public void setUser(String user) { this.user = user; } public V1QuobyteVolumeSource volume(String volume) { - this.volume = volume; return this; } @@ -198,7 +187,6 @@ public String getVolume() { return volume; } - public void setVolume(String volume) { this.volume = volume; } @@ -273,32 +261,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1QuobyteVolumeSource + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1QuobyteVolumeSource */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1QuobyteVolumeSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1QuobyteVolumeSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1QuobyteVolumeSource is not found in the empty JSON string", V1QuobyteVolumeSource.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1QuobyteVolumeSource.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1QuobyteVolumeSource` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1QuobyteVolumeSource` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1QuobyteVolumeSource.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("group") != null && !jsonObj.get("group").isJsonNull()) && !jsonObj.get("group").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `group` to be a primitive type in the JSON string but got `%s`", jsonObj.get("group").toString())); } @@ -336,9 +325,9 @@ public void write(JsonWriter out, V1QuobyteVolumeSource value) throws IOExceptio @Override public V1QuobyteVolumeSource read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -365,3 +354,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1RBDPersistentVolumeSource.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1RBDPersistentVolumeSource.java index 2a2ce3804f..99862da8f7 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1RBDPersistentVolumeSource.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1RBDPersistentVolumeSource.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1SecretReference; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * Represents a Rados Block Device mount that lasts the lifetime of a pod. RBD volumes support ownership management and SELinux relabeling. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1RBDPersistentVolumeSource { public static final String SERIALIZED_NAME_FS_TYPE = "fsType"; @SerializedName(SERIALIZED_NAME_FS_TYPE) @@ -90,7 +90,6 @@ public V1RBDPersistentVolumeSource() { } public V1RBDPersistentVolumeSource fsType(String fsType) { - this.fsType = fsType; return this; } @@ -104,14 +103,12 @@ public String getFsType() { return fsType; } - public void setFsType(String fsType) { this.fsType = fsType; } public V1RBDPersistentVolumeSource image(String image) { - this.image = image; return this; } @@ -125,14 +122,12 @@ public String getImage() { return image; } - public void setImage(String image) { this.image = image; } public V1RBDPersistentVolumeSource keyring(String keyring) { - this.keyring = keyring; return this; } @@ -146,14 +141,12 @@ public String getKeyring() { return keyring; } - public void setKeyring(String keyring) { this.keyring = keyring; } public V1RBDPersistentVolumeSource monitors(List monitors) { - this.monitors = monitors; return this; } @@ -175,14 +168,12 @@ public List getMonitors() { return monitors; } - public void setMonitors(List monitors) { this.monitors = monitors; } public V1RBDPersistentVolumeSource pool(String pool) { - this.pool = pool; return this; } @@ -196,14 +187,12 @@ public String getPool() { return pool; } - public void setPool(String pool) { this.pool = pool; } public V1RBDPersistentVolumeSource readOnly(Boolean readOnly) { - this.readOnly = readOnly; return this; } @@ -217,14 +206,12 @@ public Boolean getReadOnly() { return readOnly; } - public void setReadOnly(Boolean readOnly) { this.readOnly = readOnly; } public V1RBDPersistentVolumeSource secretRef(V1SecretReference secretRef) { - this.secretRef = secretRef; return this; } @@ -238,14 +225,12 @@ public V1SecretReference getSecretRef() { return secretRef; } - public void setSecretRef(V1SecretReference secretRef) { this.secretRef = secretRef; } public V1RBDPersistentVolumeSource user(String user) { - this.user = user; return this; } @@ -259,7 +244,6 @@ public String getUser() { return user; } - public void setUser(String user) { this.user = user; } @@ -340,32 +324,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1RBDPersistentVolumeSource + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1RBDPersistentVolumeSource */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1RBDPersistentVolumeSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1RBDPersistentVolumeSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1RBDPersistentVolumeSource is not found in the empty JSON string", V1RBDPersistentVolumeSource.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1RBDPersistentVolumeSource.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1RBDPersistentVolumeSource` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1RBDPersistentVolumeSource` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1RBDPersistentVolumeSource.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("fsType") != null && !jsonObj.get("fsType").isJsonNull()) && !jsonObj.get("fsType").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `fsType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fsType").toString())); } @@ -386,7 +371,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `secretRef` if (jsonObj.get("secretRef") != null && !jsonObj.get("secretRef").isJsonNull()) { - V1SecretReference.validateJsonObject(jsonObj.getAsJsonObject("secretRef")); + V1SecretReference.validateJsonElement(jsonObj.get("secretRef")); } if ((jsonObj.get("user") != null && !jsonObj.get("user").isJsonNull()) && !jsonObj.get("user").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `user` to be a primitive type in the JSON string but got `%s`", jsonObj.get("user").toString())); @@ -413,9 +398,9 @@ public void write(JsonWriter out, V1RBDPersistentVolumeSource value) throws IOEx @Override public V1RBDPersistentVolumeSource read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -442,3 +427,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1RBDVolumeSource.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1RBDVolumeSource.java index c2c00decbc..6fde9acb17 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1RBDVolumeSource.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1RBDVolumeSource.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1LocalObjectReference; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * Represents a Rados Block Device mount that lasts the lifetime of a pod. RBD volumes support ownership management and SELinux relabeling. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1RBDVolumeSource { public static final String SERIALIZED_NAME_FS_TYPE = "fsType"; @SerializedName(SERIALIZED_NAME_FS_TYPE) @@ -90,7 +90,6 @@ public V1RBDVolumeSource() { } public V1RBDVolumeSource fsType(String fsType) { - this.fsType = fsType; return this; } @@ -104,14 +103,12 @@ public String getFsType() { return fsType; } - public void setFsType(String fsType) { this.fsType = fsType; } public V1RBDVolumeSource image(String image) { - this.image = image; return this; } @@ -125,14 +122,12 @@ public String getImage() { return image; } - public void setImage(String image) { this.image = image; } public V1RBDVolumeSource keyring(String keyring) { - this.keyring = keyring; return this; } @@ -146,14 +141,12 @@ public String getKeyring() { return keyring; } - public void setKeyring(String keyring) { this.keyring = keyring; } public V1RBDVolumeSource monitors(List monitors) { - this.monitors = monitors; return this; } @@ -175,14 +168,12 @@ public List getMonitors() { return monitors; } - public void setMonitors(List monitors) { this.monitors = monitors; } public V1RBDVolumeSource pool(String pool) { - this.pool = pool; return this; } @@ -196,14 +187,12 @@ public String getPool() { return pool; } - public void setPool(String pool) { this.pool = pool; } public V1RBDVolumeSource readOnly(Boolean readOnly) { - this.readOnly = readOnly; return this; } @@ -217,14 +206,12 @@ public Boolean getReadOnly() { return readOnly; } - public void setReadOnly(Boolean readOnly) { this.readOnly = readOnly; } public V1RBDVolumeSource secretRef(V1LocalObjectReference secretRef) { - this.secretRef = secretRef; return this; } @@ -238,14 +225,12 @@ public V1LocalObjectReference getSecretRef() { return secretRef; } - public void setSecretRef(V1LocalObjectReference secretRef) { this.secretRef = secretRef; } public V1RBDVolumeSource user(String user) { - this.user = user; return this; } @@ -259,7 +244,6 @@ public String getUser() { return user; } - public void setUser(String user) { this.user = user; } @@ -340,32 +324,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1RBDVolumeSource + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1RBDVolumeSource */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1RBDVolumeSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1RBDVolumeSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1RBDVolumeSource is not found in the empty JSON string", V1RBDVolumeSource.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1RBDVolumeSource.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1RBDVolumeSource` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1RBDVolumeSource` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1RBDVolumeSource.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("fsType") != null && !jsonObj.get("fsType").isJsonNull()) && !jsonObj.get("fsType").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `fsType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fsType").toString())); } @@ -386,7 +371,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `secretRef` if (jsonObj.get("secretRef") != null && !jsonObj.get("secretRef").isJsonNull()) { - V1LocalObjectReference.validateJsonObject(jsonObj.getAsJsonObject("secretRef")); + V1LocalObjectReference.validateJsonElement(jsonObj.get("secretRef")); } if ((jsonObj.get("user") != null && !jsonObj.get("user").isJsonNull()) && !jsonObj.get("user").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `user` to be a primitive type in the JSON string but got `%s`", jsonObj.get("user").toString())); @@ -413,9 +398,9 @@ public void write(JsonWriter out, V1RBDVolumeSource value) throws IOException { @Override public V1RBDVolumeSource read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -442,3 +427,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ReplicaSet.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ReplicaSet.java index acea55b732..f9b0a2a4b6 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ReplicaSet.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ReplicaSet.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1ReplicaSetSpec; import io.kubernetes.client.openapi.models.V1ReplicaSetStatus; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * ReplicaSet ensures that a specified number of pod replicas are running at any given time. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ReplicaSet implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -78,7 +78,6 @@ public V1ReplicaSet() { } public V1ReplicaSet apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -92,14 +91,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1ReplicaSet kind(String kind) { - this.kind = kind; return this; } @@ -113,14 +110,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1ReplicaSet metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -134,14 +129,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V1ReplicaSet spec(V1ReplicaSetSpec spec) { - this.spec = spec; return this; } @@ -155,14 +148,12 @@ public V1ReplicaSetSpec getSpec() { return spec; } - public void setSpec(V1ReplicaSetSpec spec) { this.spec = spec; } public V1ReplicaSet status(V1ReplicaSetStatus status) { - this.status = status; return this; } @@ -176,7 +167,6 @@ public V1ReplicaSetStatus getStatus() { return status; } - public void setStatus(V1ReplicaSetStatus status) { this.status = status; } @@ -246,25 +236,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ReplicaSet + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ReplicaSet */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ReplicaSet.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ReplicaSet.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ReplicaSet is not found in the empty JSON string", V1ReplicaSet.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ReplicaSet.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ReplicaSet` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ReplicaSet` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -273,15 +264,15 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } // validate the optional field `spec` if (jsonObj.get("spec") != null && !jsonObj.get("spec").isJsonNull()) { - V1ReplicaSetSpec.validateJsonObject(jsonObj.getAsJsonObject("spec")); + V1ReplicaSetSpec.validateJsonElement(jsonObj.get("spec")); } // validate the optional field `status` if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { - V1ReplicaSetStatus.validateJsonObject(jsonObj.getAsJsonObject("status")); + V1ReplicaSetStatus.validateJsonElement(jsonObj.get("status")); } } @@ -305,9 +296,9 @@ public void write(JsonWriter out, V1ReplicaSet value) throws IOException { @Override public V1ReplicaSet read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -334,3 +325,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ReplicaSetCondition.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ReplicaSetCondition.java index a20014024c..2707e3ab2e 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ReplicaSetCondition.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ReplicaSetCondition.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * ReplicaSetCondition describes the state of a replica set at a certain point. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ReplicaSetCondition { public static final String SERIALIZED_NAME_LAST_TRANSITION_TIME = "lastTransitionTime"; @SerializedName(SERIALIZED_NAME_LAST_TRANSITION_TIME) @@ -76,7 +76,6 @@ public V1ReplicaSetCondition() { } public V1ReplicaSetCondition lastTransitionTime(OffsetDateTime lastTransitionTime) { - this.lastTransitionTime = lastTransitionTime; return this; } @@ -90,14 +89,12 @@ public OffsetDateTime getLastTransitionTime() { return lastTransitionTime; } - public void setLastTransitionTime(OffsetDateTime lastTransitionTime) { this.lastTransitionTime = lastTransitionTime; } public V1ReplicaSetCondition message(String message) { - this.message = message; return this; } @@ -111,14 +108,12 @@ public String getMessage() { return message; } - public void setMessage(String message) { this.message = message; } public V1ReplicaSetCondition reason(String reason) { - this.reason = reason; return this; } @@ -132,14 +127,12 @@ public String getReason() { return reason; } - public void setReason(String reason) { this.reason = reason; } public V1ReplicaSetCondition status(String status) { - this.status = status; return this; } @@ -153,14 +146,12 @@ public String getStatus() { return status; } - public void setStatus(String status) { this.status = status; } public V1ReplicaSetCondition type(String type) { - this.type = type; return this; } @@ -174,7 +165,6 @@ public String getType() { return type; } - public void setType(String type) { this.type = type; } @@ -246,32 +236,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ReplicaSetCondition + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ReplicaSetCondition */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ReplicaSetCondition.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ReplicaSetCondition.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ReplicaSetCondition is not found in the empty JSON string", V1ReplicaSetCondition.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ReplicaSetCondition.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ReplicaSetCondition` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ReplicaSetCondition` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1ReplicaSetCondition.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); } @@ -306,9 +297,9 @@ public void write(JsonWriter out, V1ReplicaSetCondition value) throws IOExceptio @Override public V1ReplicaSetCondition read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -335,3 +326,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ReplicaSetList.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ReplicaSetList.java index e19ba78f44..130e3a2937 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ReplicaSetList.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ReplicaSetList.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1ReplicaSet; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * ReplicaSetList is a collection of ReplicaSets. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ReplicaSetList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -75,7 +75,6 @@ public V1ReplicaSetList() { } public V1ReplicaSetList apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -89,14 +88,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1ReplicaSetList items(List items) { - this.items = items; return this; } @@ -118,14 +115,12 @@ public List getItems() { return items; } - public void setItems(List items) { this.items = items; } public V1ReplicaSetList kind(String kind) { - this.kind = kind; return this; } @@ -139,14 +134,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1ReplicaSetList metadata(V1ListMeta metadata) { - this.metadata = metadata; return this; } @@ -160,7 +153,6 @@ public V1ListMeta getMetadata() { return metadata; } - public void setMetadata(V1ListMeta metadata) { this.metadata = metadata; } @@ -228,32 +220,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ReplicaSetList + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ReplicaSetList */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ReplicaSetList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ReplicaSetList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ReplicaSetList is not found in the empty JSON string", V1ReplicaSetList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ReplicaSetList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ReplicaSetList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ReplicaSetList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1ReplicaSetList.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -265,14 +258,14 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); // validate the required field `items` (array) for (int i = 0; i < jsonArrayitems.size(); i++) { - V1ReplicaSet.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject()); + V1ReplicaSet.validateJsonElement(jsonArrayitems.get(i)); }; if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ListMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ListMeta.validateJsonElement(jsonObj.get("metadata")); } } @@ -296,9 +289,9 @@ public void write(JsonWriter out, V1ReplicaSetList value) throws IOException { @Override public V1ReplicaSetList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -325,3 +318,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ReplicaSetSpec.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ReplicaSetSpec.java index fd54cc3f54..666aacca76 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ReplicaSetSpec.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ReplicaSetSpec.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1LabelSelector; import io.kubernetes.client.openapi.models.V1PodTemplateSpec; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -43,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -51,7 +51,7 @@ /** * ReplicaSetSpec is the specification of a ReplicaSet. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ReplicaSetSpec { public static final String SERIALIZED_NAME_MIN_READY_SECONDS = "minReadySeconds"; @SerializedName(SERIALIZED_NAME_MIN_READY_SECONDS) @@ -73,7 +73,6 @@ public V1ReplicaSetSpec() { } public V1ReplicaSetSpec minReadySeconds(Integer minReadySeconds) { - this.minReadySeconds = minReadySeconds; return this; } @@ -87,14 +86,12 @@ public Integer getMinReadySeconds() { return minReadySeconds; } - public void setMinReadySeconds(Integer minReadySeconds) { this.minReadySeconds = minReadySeconds; } public V1ReplicaSetSpec replicas(Integer replicas) { - this.replicas = replicas; return this; } @@ -108,14 +105,12 @@ public Integer getReplicas() { return replicas; } - public void setReplicas(Integer replicas) { this.replicas = replicas; } public V1ReplicaSetSpec selector(V1LabelSelector selector) { - this.selector = selector; return this; } @@ -129,14 +124,12 @@ public V1LabelSelector getSelector() { return selector; } - public void setSelector(V1LabelSelector selector) { this.selector = selector; } public V1ReplicaSetSpec template(V1PodTemplateSpec template) { - this.template = template; return this; } @@ -150,7 +143,6 @@ public V1PodTemplateSpec getTemplate() { return template; } - public void setTemplate(V1PodTemplateSpec template) { this.template = template; } @@ -218,37 +210,38 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ReplicaSetSpec + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ReplicaSetSpec */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ReplicaSetSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ReplicaSetSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ReplicaSetSpec is not found in the empty JSON string", V1ReplicaSetSpec.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ReplicaSetSpec.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ReplicaSetSpec` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ReplicaSetSpec` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1ReplicaSetSpec.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the required field `selector` - V1LabelSelector.validateJsonObject(jsonObj.getAsJsonObject("selector")); + V1LabelSelector.validateJsonElement(jsonObj.get("selector")); // validate the optional field `template` if (jsonObj.get("template") != null && !jsonObj.get("template").isJsonNull()) { - V1PodTemplateSpec.validateJsonObject(jsonObj.getAsJsonObject("template")); + V1PodTemplateSpec.validateJsonElement(jsonObj.get("template")); } } @@ -272,9 +265,9 @@ public void write(JsonWriter out, V1ReplicaSetSpec value) throws IOException { @Override public V1ReplicaSetSpec read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -301,3 +294,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ReplicaSetStatus.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ReplicaSetStatus.java index 5edb6c2f68..6fc8dcfbb4 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ReplicaSetStatus.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ReplicaSetStatus.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1ReplicaSetCondition; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * ReplicaSetStatus represents the current status of a ReplicaSet. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ReplicaSetStatus { public static final String SERIALIZED_NAME_AVAILABLE_REPLICAS = "availableReplicas"; @SerializedName(SERIALIZED_NAME_AVAILABLE_REPLICAS) @@ -60,7 +60,7 @@ public class V1ReplicaSetStatus { public static final String SERIALIZED_NAME_CONDITIONS = "conditions"; @SerializedName(SERIALIZED_NAME_CONDITIONS) - private List conditions; + private List conditions = new ArrayList<>(); public static final String SERIALIZED_NAME_FULLY_LABELED_REPLICAS = "fullyLabeledReplicas"; @SerializedName(SERIALIZED_NAME_FULLY_LABELED_REPLICAS) @@ -82,7 +82,6 @@ public V1ReplicaSetStatus() { } public V1ReplicaSetStatus availableReplicas(Integer availableReplicas) { - this.availableReplicas = availableReplicas; return this; } @@ -96,14 +95,12 @@ public Integer getAvailableReplicas() { return availableReplicas; } - public void setAvailableReplicas(Integer availableReplicas) { this.availableReplicas = availableReplicas; } public V1ReplicaSetStatus conditions(List conditions) { - this.conditions = conditions; return this; } @@ -125,14 +122,12 @@ public List getConditions() { return conditions; } - public void setConditions(List conditions) { this.conditions = conditions; } public V1ReplicaSetStatus fullyLabeledReplicas(Integer fullyLabeledReplicas) { - this.fullyLabeledReplicas = fullyLabeledReplicas; return this; } @@ -146,14 +141,12 @@ public Integer getFullyLabeledReplicas() { return fullyLabeledReplicas; } - public void setFullyLabeledReplicas(Integer fullyLabeledReplicas) { this.fullyLabeledReplicas = fullyLabeledReplicas; } public V1ReplicaSetStatus observedGeneration(Long observedGeneration) { - this.observedGeneration = observedGeneration; return this; } @@ -167,14 +160,12 @@ public Long getObservedGeneration() { return observedGeneration; } - public void setObservedGeneration(Long observedGeneration) { this.observedGeneration = observedGeneration; } public V1ReplicaSetStatus readyReplicas(Integer readyReplicas) { - this.readyReplicas = readyReplicas; return this; } @@ -188,14 +179,12 @@ public Integer getReadyReplicas() { return readyReplicas; } - public void setReadyReplicas(Integer readyReplicas) { this.readyReplicas = readyReplicas; } public V1ReplicaSetStatus replicas(Integer replicas) { - this.replicas = replicas; return this; } @@ -209,7 +198,6 @@ public Integer getReplicas() { return replicas; } - public void setReplicas(Integer replicas) { this.replicas = replicas; } @@ -283,32 +271,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ReplicaSetStatus + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ReplicaSetStatus */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ReplicaSetStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ReplicaSetStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ReplicaSetStatus is not found in the empty JSON string", V1ReplicaSetStatus.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ReplicaSetStatus.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ReplicaSetStatus` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ReplicaSetStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1ReplicaSetStatus.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (jsonObj.get("conditions") != null && !jsonObj.get("conditions").isJsonNull()) { JsonArray jsonArrayconditions = jsonObj.getAsJsonArray("conditions"); if (jsonArrayconditions != null) { @@ -319,7 +308,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `conditions` (array) for (int i = 0; i < jsonArrayconditions.size(); i++) { - V1ReplicaSetCondition.validateJsonObject(jsonArrayconditions.get(i).getAsJsonObject()); + V1ReplicaSetCondition.validateJsonElement(jsonArrayconditions.get(i)); }; } } @@ -345,9 +334,9 @@ public void write(JsonWriter out, V1ReplicaSetStatus value) throws IOException { @Override public V1ReplicaSetStatus read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -374,3 +363,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ReplicationController.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ReplicationController.java index 136320c3e1..23d5cbe7bd 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ReplicationController.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ReplicationController.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1ReplicationControllerSpec; import io.kubernetes.client.openapi.models.V1ReplicationControllerStatus; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * ReplicationController represents the configuration of a replication controller. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ReplicationController implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -78,7 +78,6 @@ public V1ReplicationController() { } public V1ReplicationController apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -92,14 +91,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1ReplicationController kind(String kind) { - this.kind = kind; return this; } @@ -113,14 +110,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1ReplicationController metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -134,14 +129,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V1ReplicationController spec(V1ReplicationControllerSpec spec) { - this.spec = spec; return this; } @@ -155,14 +148,12 @@ public V1ReplicationControllerSpec getSpec() { return spec; } - public void setSpec(V1ReplicationControllerSpec spec) { this.spec = spec; } public V1ReplicationController status(V1ReplicationControllerStatus status) { - this.status = status; return this; } @@ -176,7 +167,6 @@ public V1ReplicationControllerStatus getStatus() { return status; } - public void setStatus(V1ReplicationControllerStatus status) { this.status = status; } @@ -246,25 +236,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ReplicationController + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ReplicationController */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ReplicationController.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ReplicationController.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ReplicationController is not found in the empty JSON string", V1ReplicationController.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ReplicationController.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ReplicationController` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ReplicationController` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -273,15 +264,15 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } // validate the optional field `spec` if (jsonObj.get("spec") != null && !jsonObj.get("spec").isJsonNull()) { - V1ReplicationControllerSpec.validateJsonObject(jsonObj.getAsJsonObject("spec")); + V1ReplicationControllerSpec.validateJsonElement(jsonObj.get("spec")); } // validate the optional field `status` if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { - V1ReplicationControllerStatus.validateJsonObject(jsonObj.getAsJsonObject("status")); + V1ReplicationControllerStatus.validateJsonElement(jsonObj.get("status")); } } @@ -305,9 +296,9 @@ public void write(JsonWriter out, V1ReplicationController value) throws IOExcept @Override public V1ReplicationController read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -334,3 +325,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ReplicationControllerCondition.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ReplicationControllerCondition.java index 61e254725f..4f02e8389e 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ReplicationControllerCondition.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ReplicationControllerCondition.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * ReplicationControllerCondition describes the state of a replication controller at a certain point. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ReplicationControllerCondition { public static final String SERIALIZED_NAME_LAST_TRANSITION_TIME = "lastTransitionTime"; @SerializedName(SERIALIZED_NAME_LAST_TRANSITION_TIME) @@ -76,7 +76,6 @@ public V1ReplicationControllerCondition() { } public V1ReplicationControllerCondition lastTransitionTime(OffsetDateTime lastTransitionTime) { - this.lastTransitionTime = lastTransitionTime; return this; } @@ -90,14 +89,12 @@ public OffsetDateTime getLastTransitionTime() { return lastTransitionTime; } - public void setLastTransitionTime(OffsetDateTime lastTransitionTime) { this.lastTransitionTime = lastTransitionTime; } public V1ReplicationControllerCondition message(String message) { - this.message = message; return this; } @@ -111,14 +108,12 @@ public String getMessage() { return message; } - public void setMessage(String message) { this.message = message; } public V1ReplicationControllerCondition reason(String reason) { - this.reason = reason; return this; } @@ -132,14 +127,12 @@ public String getReason() { return reason; } - public void setReason(String reason) { this.reason = reason; } public V1ReplicationControllerCondition status(String status) { - this.status = status; return this; } @@ -153,14 +146,12 @@ public String getStatus() { return status; } - public void setStatus(String status) { this.status = status; } public V1ReplicationControllerCondition type(String type) { - this.type = type; return this; } @@ -174,7 +165,6 @@ public String getType() { return type; } - public void setType(String type) { this.type = type; } @@ -246,32 +236,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ReplicationControllerCondition + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ReplicationControllerCondition */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ReplicationControllerCondition.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ReplicationControllerCondition.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ReplicationControllerCondition is not found in the empty JSON string", V1ReplicationControllerCondition.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ReplicationControllerCondition.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ReplicationControllerCondition` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ReplicationControllerCondition` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1ReplicationControllerCondition.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); } @@ -306,9 +297,9 @@ public void write(JsonWriter out, V1ReplicationControllerCondition value) throws @Override public V1ReplicationControllerCondition read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -335,3 +326,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ReplicationControllerList.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ReplicationControllerList.java index 0766680d81..d9156a0bad 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ReplicationControllerList.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ReplicationControllerList.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1ReplicationController; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * ReplicationControllerList is a collection of replication controllers. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ReplicationControllerList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -75,7 +75,6 @@ public V1ReplicationControllerList() { } public V1ReplicationControllerList apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -89,14 +88,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1ReplicationControllerList items(List items) { - this.items = items; return this; } @@ -118,14 +115,12 @@ public List getItems() { return items; } - public void setItems(List items) { this.items = items; } public V1ReplicationControllerList kind(String kind) { - this.kind = kind; return this; } @@ -139,14 +134,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1ReplicationControllerList metadata(V1ListMeta metadata) { - this.metadata = metadata; return this; } @@ -160,7 +153,6 @@ public V1ListMeta getMetadata() { return metadata; } - public void setMetadata(V1ListMeta metadata) { this.metadata = metadata; } @@ -228,32 +220,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ReplicationControllerList + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ReplicationControllerList */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ReplicationControllerList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ReplicationControllerList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ReplicationControllerList is not found in the empty JSON string", V1ReplicationControllerList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ReplicationControllerList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ReplicationControllerList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ReplicationControllerList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1ReplicationControllerList.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -265,14 +258,14 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); // validate the required field `items` (array) for (int i = 0; i < jsonArrayitems.size(); i++) { - V1ReplicationController.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject()); + V1ReplicationController.validateJsonElement(jsonArrayitems.get(i)); }; if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ListMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ListMeta.validateJsonElement(jsonObj.get("metadata")); } } @@ -296,9 +289,9 @@ public void write(JsonWriter out, V1ReplicationControllerList value) throws IOEx @Override public V1ReplicationControllerList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -325,3 +318,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ReplicationControllerSpec.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ReplicationControllerSpec.java index d9fc8bee96..af62c084c6 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ReplicationControllerSpec.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ReplicationControllerSpec.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.openapi.models.V1PodTemplateSpec; import java.io.IOException; +import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * ReplicationControllerSpec is the specification of a replication controller. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ReplicationControllerSpec { public static final String SERIALIZED_NAME_MIN_READY_SECONDS = "minReadySeconds"; @SerializedName(SERIALIZED_NAME_MIN_READY_SECONDS) @@ -74,7 +74,6 @@ public V1ReplicationControllerSpec() { } public V1ReplicationControllerSpec minReadySeconds(Integer minReadySeconds) { - this.minReadySeconds = minReadySeconds; return this; } @@ -88,14 +87,12 @@ public Integer getMinReadySeconds() { return minReadySeconds; } - public void setMinReadySeconds(Integer minReadySeconds) { this.minReadySeconds = minReadySeconds; } public V1ReplicationControllerSpec replicas(Integer replicas) { - this.replicas = replicas; return this; } @@ -109,14 +106,12 @@ public Integer getReplicas() { return replicas; } - public void setReplicas(Integer replicas) { this.replicas = replicas; } public V1ReplicationControllerSpec selector(Map selector) { - this.selector = selector; return this; } @@ -138,14 +133,12 @@ public Map getSelector() { return selector; } - public void setSelector(Map selector) { this.selector = selector; } public V1ReplicationControllerSpec template(V1PodTemplateSpec template) { - this.template = template; return this; } @@ -159,7 +152,6 @@ public V1PodTemplateSpec getTemplate() { return template; } - public void setTemplate(V1PodTemplateSpec template) { this.template = template; } @@ -226,28 +218,29 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ReplicationControllerSpec + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ReplicationControllerSpec */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ReplicationControllerSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ReplicationControllerSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ReplicationControllerSpec is not found in the empty JSON string", V1ReplicationControllerSpec.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ReplicationControllerSpec.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ReplicationControllerSpec` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ReplicationControllerSpec` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `template` if (jsonObj.get("template") != null && !jsonObj.get("template").isJsonNull()) { - V1PodTemplateSpec.validateJsonObject(jsonObj.getAsJsonObject("template")); + V1PodTemplateSpec.validateJsonElement(jsonObj.get("template")); } } @@ -271,9 +264,9 @@ public void write(JsonWriter out, V1ReplicationControllerSpec value) throws IOEx @Override public V1ReplicationControllerSpec read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -300,3 +293,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ReplicationControllerStatus.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ReplicationControllerStatus.java index 7dd8a863d0..98b8a10725 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ReplicationControllerStatus.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ReplicationControllerStatus.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1ReplicationControllerCondition; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * ReplicationControllerStatus represents the current status of a replication controller. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ReplicationControllerStatus { public static final String SERIALIZED_NAME_AVAILABLE_REPLICAS = "availableReplicas"; @SerializedName(SERIALIZED_NAME_AVAILABLE_REPLICAS) @@ -60,7 +60,7 @@ public class V1ReplicationControllerStatus { public static final String SERIALIZED_NAME_CONDITIONS = "conditions"; @SerializedName(SERIALIZED_NAME_CONDITIONS) - private List conditions; + private List conditions = new ArrayList<>(); public static final String SERIALIZED_NAME_FULLY_LABELED_REPLICAS = "fullyLabeledReplicas"; @SerializedName(SERIALIZED_NAME_FULLY_LABELED_REPLICAS) @@ -82,7 +82,6 @@ public V1ReplicationControllerStatus() { } public V1ReplicationControllerStatus availableReplicas(Integer availableReplicas) { - this.availableReplicas = availableReplicas; return this; } @@ -96,14 +95,12 @@ public Integer getAvailableReplicas() { return availableReplicas; } - public void setAvailableReplicas(Integer availableReplicas) { this.availableReplicas = availableReplicas; } public V1ReplicationControllerStatus conditions(List conditions) { - this.conditions = conditions; return this; } @@ -125,14 +122,12 @@ public List getConditions() { return conditions; } - public void setConditions(List conditions) { this.conditions = conditions; } public V1ReplicationControllerStatus fullyLabeledReplicas(Integer fullyLabeledReplicas) { - this.fullyLabeledReplicas = fullyLabeledReplicas; return this; } @@ -146,14 +141,12 @@ public Integer getFullyLabeledReplicas() { return fullyLabeledReplicas; } - public void setFullyLabeledReplicas(Integer fullyLabeledReplicas) { this.fullyLabeledReplicas = fullyLabeledReplicas; } public V1ReplicationControllerStatus observedGeneration(Long observedGeneration) { - this.observedGeneration = observedGeneration; return this; } @@ -167,14 +160,12 @@ public Long getObservedGeneration() { return observedGeneration; } - public void setObservedGeneration(Long observedGeneration) { this.observedGeneration = observedGeneration; } public V1ReplicationControllerStatus readyReplicas(Integer readyReplicas) { - this.readyReplicas = readyReplicas; return this; } @@ -188,14 +179,12 @@ public Integer getReadyReplicas() { return readyReplicas; } - public void setReadyReplicas(Integer readyReplicas) { this.readyReplicas = readyReplicas; } public V1ReplicationControllerStatus replicas(Integer replicas) { - this.replicas = replicas; return this; } @@ -209,7 +198,6 @@ public Integer getReplicas() { return replicas; } - public void setReplicas(Integer replicas) { this.replicas = replicas; } @@ -283,32 +271,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ReplicationControllerStatus + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ReplicationControllerStatus */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ReplicationControllerStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ReplicationControllerStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ReplicationControllerStatus is not found in the empty JSON string", V1ReplicationControllerStatus.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ReplicationControllerStatus.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ReplicationControllerStatus` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ReplicationControllerStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1ReplicationControllerStatus.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (jsonObj.get("conditions") != null && !jsonObj.get("conditions").isJsonNull()) { JsonArray jsonArrayconditions = jsonObj.getAsJsonArray("conditions"); if (jsonArrayconditions != null) { @@ -319,7 +308,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `conditions` (array) for (int i = 0; i < jsonArrayconditions.size(); i++) { - V1ReplicationControllerCondition.validateJsonObject(jsonArrayconditions.get(i).getAsJsonObject()); + V1ReplicationControllerCondition.validateJsonElement(jsonArrayconditions.get(i)); }; } } @@ -345,9 +334,9 @@ public void write(JsonWriter out, V1ReplicationControllerStatus value) throws IO @Override public V1ReplicationControllerStatus read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -374,3 +363,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ResourceAttributes.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ResourceAttributes.java index 12ff5fc523..7983f12ff6 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ResourceAttributes.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ResourceAttributes.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ResourceAttributes { public static final String SERIALIZED_NAME_GROUP = "group"; @SerializedName(SERIALIZED_NAME_GROUP) @@ -83,7 +83,6 @@ public V1ResourceAttributes() { } public V1ResourceAttributes group(String group) { - this.group = group; return this; } @@ -97,14 +96,12 @@ public String getGroup() { return group; } - public void setGroup(String group) { this.group = group; } public V1ResourceAttributes name(String name) { - this.name = name; return this; } @@ -118,14 +115,12 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } public V1ResourceAttributes namespace(String namespace) { - this.namespace = namespace; return this; } @@ -139,14 +134,12 @@ public String getNamespace() { return namespace; } - public void setNamespace(String namespace) { this.namespace = namespace; } public V1ResourceAttributes resource(String resource) { - this.resource = resource; return this; } @@ -160,14 +153,12 @@ public String getResource() { return resource; } - public void setResource(String resource) { this.resource = resource; } public V1ResourceAttributes subresource(String subresource) { - this.subresource = subresource; return this; } @@ -181,14 +172,12 @@ public String getSubresource() { return subresource; } - public void setSubresource(String subresource) { this.subresource = subresource; } public V1ResourceAttributes verb(String verb) { - this.verb = verb; return this; } @@ -202,14 +191,12 @@ public String getVerb() { return verb; } - public void setVerb(String verb) { this.verb = verb; } public V1ResourceAttributes version(String version) { - this.version = version; return this; } @@ -223,7 +210,6 @@ public String getVersion() { return version; } - public void setVersion(String version) { this.version = version; } @@ -299,25 +285,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ResourceAttributes + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ResourceAttributes */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ResourceAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ResourceAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ResourceAttributes is not found in the empty JSON string", V1ResourceAttributes.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ResourceAttributes.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ResourceAttributes` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ResourceAttributes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("group") != null && !jsonObj.get("group").isJsonNull()) && !jsonObj.get("group").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `group` to be a primitive type in the JSON string but got `%s`", jsonObj.get("group").toString())); } @@ -361,9 +348,9 @@ public void write(JsonWriter out, V1ResourceAttributes value) throws IOException @Override public V1ResourceAttributes read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -390,3 +377,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ResourceClaim.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ResourceClaim.java index de3a2166c9..6f9571d842 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ResourceClaim.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ResourceClaim.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * ResourceClaim references one entry in PodSpec.ResourceClaims. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ResourceClaim { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) @@ -59,7 +59,6 @@ public V1ResourceClaim() { } public V1ResourceClaim name(String name) { - this.name = name; return this; } @@ -73,7 +72,6 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } @@ -132,32 +130,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ResourceClaim + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ResourceClaim */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ResourceClaim.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ResourceClaim.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ResourceClaim is not found in the empty JSON string", V1ResourceClaim.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ResourceClaim.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ResourceClaim` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ResourceClaim` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1ResourceClaim.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } @@ -183,9 +182,9 @@ public void write(JsonWriter out, V1ResourceClaim value) throws IOException { @Override public V1ResourceClaim read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -212,3 +211,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ResourceFieldSelector.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ResourceFieldSelector.java index da84cd035e..6cb451ef40 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ResourceFieldSelector.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ResourceFieldSelector.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.custom.Quantity; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * ResourceFieldSelector represents container resources (cpu, memory) and their output format */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ResourceFieldSelector { public static final String SERIALIZED_NAME_CONTAINER_NAME = "containerName"; @SerializedName(SERIALIZED_NAME_CONTAINER_NAME) @@ -68,7 +68,6 @@ public V1ResourceFieldSelector() { } public V1ResourceFieldSelector containerName(String containerName) { - this.containerName = containerName; return this; } @@ -82,14 +81,12 @@ public String getContainerName() { return containerName; } - public void setContainerName(String containerName) { this.containerName = containerName; } public V1ResourceFieldSelector divisor(Quantity divisor) { - this.divisor = divisor; return this; } @@ -103,14 +100,12 @@ public Quantity getDivisor() { return divisor; } - public void setDivisor(Quantity divisor) { this.divisor = divisor; } public V1ResourceFieldSelector resource(String resource) { - this.resource = resource; return this; } @@ -124,7 +119,6 @@ public String getResource() { return resource; } - public void setResource(String resource) { this.resource = resource; } @@ -189,32 +183,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ResourceFieldSelector + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ResourceFieldSelector */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ResourceFieldSelector.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ResourceFieldSelector.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ResourceFieldSelector is not found in the empty JSON string", V1ResourceFieldSelector.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ResourceFieldSelector.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ResourceFieldSelector` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ResourceFieldSelector` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1ResourceFieldSelector.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("containerName") != null && !jsonObj.get("containerName").isJsonNull()) && !jsonObj.get("containerName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `containerName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("containerName").toString())); } @@ -246,9 +241,9 @@ public void write(JsonWriter out, V1ResourceFieldSelector value) throws IOExcept @Override public V1ResourceFieldSelector read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -275,3 +270,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ResourcePolicyRule.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ResourcePolicyRule.java index 7fa2a6f46d..8aa3f3c842 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ResourcePolicyRule.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ResourcePolicyRule.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -43,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -51,7 +51,7 @@ /** * ResourcePolicyRule is a predicate that matches some resource requests, testing the request's verb and the target resource. A ResourcePolicyRule matches a resource request if and only if: (a) at least one member of verbs matches the request, (b) at least one member of apiGroups matches the request, (c) at least one member of resources matches the request, and (d) either (d1) the request does not specify a namespace (i.e., `Namespace==\"\"`) and clusterScope is true or (d2) the request specifies a namespace and least one member of namespaces matches the request's namespace. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ResourcePolicyRule { public static final String SERIALIZED_NAME_API_GROUPS = "apiGroups"; @SerializedName(SERIALIZED_NAME_API_GROUPS) @@ -63,7 +63,7 @@ public class V1ResourcePolicyRule { public static final String SERIALIZED_NAME_NAMESPACES = "namespaces"; @SerializedName(SERIALIZED_NAME_NAMESPACES) - private List namespaces; + private List namespaces = new ArrayList<>(); public static final String SERIALIZED_NAME_RESOURCES = "resources"; @SerializedName(SERIALIZED_NAME_RESOURCES) @@ -77,7 +77,6 @@ public V1ResourcePolicyRule() { } public V1ResourcePolicyRule apiGroups(List apiGroups) { - this.apiGroups = apiGroups; return this; } @@ -99,14 +98,12 @@ public List getApiGroups() { return apiGroups; } - public void setApiGroups(List apiGroups) { this.apiGroups = apiGroups; } public V1ResourcePolicyRule clusterScope(Boolean clusterScope) { - this.clusterScope = clusterScope; return this; } @@ -120,14 +117,12 @@ public Boolean getClusterScope() { return clusterScope; } - public void setClusterScope(Boolean clusterScope) { this.clusterScope = clusterScope; } public V1ResourcePolicyRule namespaces(List namespaces) { - this.namespaces = namespaces; return this; } @@ -149,14 +144,12 @@ public List getNamespaces() { return namespaces; } - public void setNamespaces(List namespaces) { this.namespaces = namespaces; } public V1ResourcePolicyRule resources(List resources) { - this.resources = resources; return this; } @@ -178,14 +171,12 @@ public List getResources() { return resources; } - public void setResources(List resources) { this.resources = resources; } public V1ResourcePolicyRule verbs(List verbs) { - this.verbs = verbs; return this; } @@ -207,7 +198,6 @@ public List getVerbs() { return verbs; } - public void setVerbs(List verbs) { this.verbs = verbs; } @@ -280,32 +270,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ResourcePolicyRule + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ResourcePolicyRule */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ResourcePolicyRule.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ResourcePolicyRule.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ResourcePolicyRule is not found in the empty JSON string", V1ResourcePolicyRule.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ResourcePolicyRule.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ResourcePolicyRule` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ResourcePolicyRule` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1ResourcePolicyRule.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the required json array is present if (jsonObj.get("apiGroups") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); @@ -313,7 +304,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("Expected the field `apiGroups` to be an array in the JSON string but got `%s`", jsonObj.get("apiGroups").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("namespaces") != null && !jsonObj.get("namespaces").isJsonArray()) { + if (jsonObj.get("namespaces") != null && !jsonObj.get("namespaces").isJsonNull() && !jsonObj.get("namespaces").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `namespaces` to be an array in the JSON string but got `%s`", jsonObj.get("namespaces").toString())); } // ensure the required json array is present @@ -350,9 +341,9 @@ public void write(JsonWriter out, V1ResourcePolicyRule value) throws IOException @Override public V1ResourcePolicyRule read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -379,3 +370,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ResourceQuota.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ResourceQuota.java index 27a8f99399..0bb37dcbbe 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ResourceQuota.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ResourceQuota.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1ResourceQuotaSpec; import io.kubernetes.client.openapi.models.V1ResourceQuotaStatus; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * ResourceQuota sets aggregate quota restrictions enforced per namespace */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ResourceQuota implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -78,7 +78,6 @@ public V1ResourceQuota() { } public V1ResourceQuota apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -92,14 +91,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1ResourceQuota kind(String kind) { - this.kind = kind; return this; } @@ -113,14 +110,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1ResourceQuota metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -134,14 +129,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V1ResourceQuota spec(V1ResourceQuotaSpec spec) { - this.spec = spec; return this; } @@ -155,14 +148,12 @@ public V1ResourceQuotaSpec getSpec() { return spec; } - public void setSpec(V1ResourceQuotaSpec spec) { this.spec = spec; } public V1ResourceQuota status(V1ResourceQuotaStatus status) { - this.status = status; return this; } @@ -176,7 +167,6 @@ public V1ResourceQuotaStatus getStatus() { return status; } - public void setStatus(V1ResourceQuotaStatus status) { this.status = status; } @@ -246,25 +236,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ResourceQuota + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ResourceQuota */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ResourceQuota.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ResourceQuota.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ResourceQuota is not found in the empty JSON string", V1ResourceQuota.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ResourceQuota.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ResourceQuota` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ResourceQuota` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -273,15 +264,15 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } // validate the optional field `spec` if (jsonObj.get("spec") != null && !jsonObj.get("spec").isJsonNull()) { - V1ResourceQuotaSpec.validateJsonObject(jsonObj.getAsJsonObject("spec")); + V1ResourceQuotaSpec.validateJsonElement(jsonObj.get("spec")); } // validate the optional field `status` if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { - V1ResourceQuotaStatus.validateJsonObject(jsonObj.getAsJsonObject("status")); + V1ResourceQuotaStatus.validateJsonElement(jsonObj.get("status")); } } @@ -305,9 +296,9 @@ public void write(JsonWriter out, V1ResourceQuota value) throws IOException { @Override public V1ResourceQuota read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -334,3 +325,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ResourceQuotaList.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ResourceQuotaList.java index 05177a8fdc..276238c7df 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ResourceQuotaList.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ResourceQuotaList.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1ResourceQuota; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * ResourceQuotaList is a list of ResourceQuota items. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ResourceQuotaList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -75,7 +75,6 @@ public V1ResourceQuotaList() { } public V1ResourceQuotaList apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -89,14 +88,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1ResourceQuotaList items(List items) { - this.items = items; return this; } @@ -118,14 +115,12 @@ public List getItems() { return items; } - public void setItems(List items) { this.items = items; } public V1ResourceQuotaList kind(String kind) { - this.kind = kind; return this; } @@ -139,14 +134,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1ResourceQuotaList metadata(V1ListMeta metadata) { - this.metadata = metadata; return this; } @@ -160,7 +153,6 @@ public V1ListMeta getMetadata() { return metadata; } - public void setMetadata(V1ListMeta metadata) { this.metadata = metadata; } @@ -228,32 +220,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ResourceQuotaList + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ResourceQuotaList */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ResourceQuotaList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ResourceQuotaList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ResourceQuotaList is not found in the empty JSON string", V1ResourceQuotaList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ResourceQuotaList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ResourceQuotaList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ResourceQuotaList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1ResourceQuotaList.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -265,14 +258,14 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); // validate the required field `items` (array) for (int i = 0; i < jsonArrayitems.size(); i++) { - V1ResourceQuota.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject()); + V1ResourceQuota.validateJsonElement(jsonArrayitems.get(i)); }; if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ListMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ListMeta.validateJsonElement(jsonObj.get("metadata")); } } @@ -296,9 +289,9 @@ public void write(JsonWriter out, V1ResourceQuotaList value) throws IOException @Override public V1ResourceQuotaList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -325,3 +318,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ResourceQuotaSpec.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ResourceQuotaSpec.java index b5345ea79c..3f881a9425 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ResourceQuotaSpec.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ResourceQuotaSpec.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1ScopeSelector; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -47,7 +48,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -55,7 +55,7 @@ /** * ResourceQuotaSpec defines the desired hard limits to enforce for Quota. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ResourceQuotaSpec { public static final String SERIALIZED_NAME_HARD = "hard"; @SerializedName(SERIALIZED_NAME_HARD) @@ -67,13 +67,12 @@ public class V1ResourceQuotaSpec { public static final String SERIALIZED_NAME_SCOPES = "scopes"; @SerializedName(SERIALIZED_NAME_SCOPES) - private List scopes; + private List scopes = new ArrayList<>(); public V1ResourceQuotaSpec() { } public V1ResourceQuotaSpec hard(Map hard) { - this.hard = hard; return this; } @@ -95,14 +94,12 @@ public Map getHard() { return hard; } - public void setHard(Map hard) { this.hard = hard; } public V1ResourceQuotaSpec scopeSelector(V1ScopeSelector scopeSelector) { - this.scopeSelector = scopeSelector; return this; } @@ -116,14 +113,12 @@ public V1ScopeSelector getScopeSelector() { return scopeSelector; } - public void setScopeSelector(V1ScopeSelector scopeSelector) { this.scopeSelector = scopeSelector; } public V1ResourceQuotaSpec scopes(List scopes) { - this.scopes = scopes; return this; } @@ -145,7 +140,6 @@ public List getScopes() { return scopes; } - public void setScopes(List scopes) { this.scopes = scopes; } @@ -209,31 +203,32 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ResourceQuotaSpec + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ResourceQuotaSpec */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ResourceQuotaSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ResourceQuotaSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ResourceQuotaSpec is not found in the empty JSON string", V1ResourceQuotaSpec.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ResourceQuotaSpec.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ResourceQuotaSpec` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ResourceQuotaSpec` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `scopeSelector` if (jsonObj.get("scopeSelector") != null && !jsonObj.get("scopeSelector").isJsonNull()) { - V1ScopeSelector.validateJsonObject(jsonObj.getAsJsonObject("scopeSelector")); + V1ScopeSelector.validateJsonElement(jsonObj.get("scopeSelector")); } // ensure the optional json data is an array if present - if (jsonObj.get("scopes") != null && !jsonObj.get("scopes").isJsonArray()) { + if (jsonObj.get("scopes") != null && !jsonObj.get("scopes").isJsonNull() && !jsonObj.get("scopes").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `scopes` to be an array in the JSON string but got `%s`", jsonObj.get("scopes").toString())); } } @@ -258,9 +253,9 @@ public void write(JsonWriter out, V1ResourceQuotaSpec value) throws IOException @Override public V1ResourceQuotaSpec read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -287,3 +282,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ResourceQuotaStatus.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ResourceQuotaStatus.java index 50b58caac9..d44b6ca1e9 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ResourceQuotaStatus.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ResourceQuotaStatus.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.custom.Quantity; import java.io.IOException; +import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * ResourceQuotaStatus defines the enforced hard limits and observed use. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ResourceQuotaStatus { public static final String SERIALIZED_NAME_HARD = "hard"; @SerializedName(SERIALIZED_NAME_HARD) @@ -66,7 +66,6 @@ public V1ResourceQuotaStatus() { } public V1ResourceQuotaStatus hard(Map hard) { - this.hard = hard; return this; } @@ -88,14 +87,12 @@ public Map getHard() { return hard; } - public void setHard(Map hard) { this.hard = hard; } public V1ResourceQuotaStatus used(Map used) { - this.used = used; return this; } @@ -117,7 +114,6 @@ public Map getUsed() { return used; } - public void setUsed(Map used) { this.used = used; } @@ -178,25 +174,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ResourceQuotaStatus + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ResourceQuotaStatus */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ResourceQuotaStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ResourceQuotaStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ResourceQuotaStatus is not found in the empty JSON string", V1ResourceQuotaStatus.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ResourceQuotaStatus.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ResourceQuotaStatus` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ResourceQuotaStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -219,9 +216,9 @@ public void write(JsonWriter out, V1ResourceQuotaStatus value) throws IOExceptio @Override public V1ResourceQuotaStatus read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -248,3 +245,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ResourceRequirements.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ResourceRequirements.java index fbacfa6747..5e9470c46c 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ResourceRequirements.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ResourceRequirements.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1ResourceClaim; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -47,7 +48,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -55,11 +55,11 @@ /** * ResourceRequirements describes the compute resource requirements. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ResourceRequirements { public static final String SERIALIZED_NAME_CLAIMS = "claims"; @SerializedName(SERIALIZED_NAME_CLAIMS) - private List claims; + private List claims = new ArrayList<>(); public static final String SERIALIZED_NAME_LIMITS = "limits"; @SerializedName(SERIALIZED_NAME_LIMITS) @@ -73,7 +73,6 @@ public V1ResourceRequirements() { } public V1ResourceRequirements claims(List claims) { - this.claims = claims; return this; } @@ -95,14 +94,12 @@ public List getClaims() { return claims; } - public void setClaims(List claims) { this.claims = claims; } public V1ResourceRequirements limits(Map limits) { - this.limits = limits; return this; } @@ -124,14 +121,12 @@ public Map getLimits() { return limits; } - public void setLimits(Map limits) { this.limits = limits; } public V1ResourceRequirements requests(Map requests) { - this.requests = requests; return this; } @@ -153,7 +148,6 @@ public Map getRequests() { return requests; } - public void setRequests(Map requests) { this.requests = requests; } @@ -217,25 +211,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ResourceRequirements + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ResourceRequirements */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ResourceRequirements.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ResourceRequirements.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ResourceRequirements is not found in the empty JSON string", V1ResourceRequirements.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ResourceRequirements.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ResourceRequirements` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ResourceRequirements` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (jsonObj.get("claims") != null && !jsonObj.get("claims").isJsonNull()) { JsonArray jsonArrayclaims = jsonObj.getAsJsonArray("claims"); if (jsonArrayclaims != null) { @@ -246,7 +241,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `claims` (array) for (int i = 0; i < jsonArrayclaims.size(); i++) { - V1ResourceClaim.validateJsonObject(jsonArrayclaims.get(i).getAsJsonObject()); + V1ResourceClaim.validateJsonElement(jsonArrayclaims.get(i)); }; } } @@ -272,9 +267,9 @@ public void write(JsonWriter out, V1ResourceRequirements value) throws IOExcepti @Override public V1ResourceRequirements read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -301,3 +296,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ResourceRule.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ResourceRule.java index 187ea62b83..f1b004e75b 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ResourceRule.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ResourceRule.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -43,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -51,19 +51,19 @@ /** * ResourceRule is the list of actions the subject is allowed to perform on resources. The list ordering isn't significant, may contain duplicates, and possibly be incomplete. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ResourceRule { public static final String SERIALIZED_NAME_API_GROUPS = "apiGroups"; @SerializedName(SERIALIZED_NAME_API_GROUPS) - private List apiGroups; + private List apiGroups = new ArrayList<>(); public static final String SERIALIZED_NAME_RESOURCE_NAMES = "resourceNames"; @SerializedName(SERIALIZED_NAME_RESOURCE_NAMES) - private List resourceNames; + private List resourceNames = new ArrayList<>(); public static final String SERIALIZED_NAME_RESOURCES = "resources"; @SerializedName(SERIALIZED_NAME_RESOURCES) - private List resources; + private List resources = new ArrayList<>(); public static final String SERIALIZED_NAME_VERBS = "verbs"; @SerializedName(SERIALIZED_NAME_VERBS) @@ -73,7 +73,6 @@ public V1ResourceRule() { } public V1ResourceRule apiGroups(List apiGroups) { - this.apiGroups = apiGroups; return this; } @@ -95,14 +94,12 @@ public List getApiGroups() { return apiGroups; } - public void setApiGroups(List apiGroups) { this.apiGroups = apiGroups; } public V1ResourceRule resourceNames(List resourceNames) { - this.resourceNames = resourceNames; return this; } @@ -124,14 +121,12 @@ public List getResourceNames() { return resourceNames; } - public void setResourceNames(List resourceNames) { this.resourceNames = resourceNames; } public V1ResourceRule resources(List resources) { - this.resources = resources; return this; } @@ -153,14 +148,12 @@ public List getResources() { return resources; } - public void setResources(List resources) { this.resources = resources; } public V1ResourceRule verbs(List verbs) { - this.verbs = verbs; return this; } @@ -182,7 +175,6 @@ public List getVerbs() { return verbs; } - public void setVerbs(List verbs) { this.verbs = verbs; } @@ -250,42 +242,43 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ResourceRule + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ResourceRule */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ResourceRule.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ResourceRule.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ResourceRule is not found in the empty JSON string", V1ResourceRule.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ResourceRule.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ResourceRule` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ResourceRule` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1ResourceRule.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the optional json data is an array if present - if (jsonObj.get("apiGroups") != null && !jsonObj.get("apiGroups").isJsonArray()) { + if (jsonObj.get("apiGroups") != null && !jsonObj.get("apiGroups").isJsonNull() && !jsonObj.get("apiGroups").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `apiGroups` to be an array in the JSON string but got `%s`", jsonObj.get("apiGroups").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("resourceNames") != null && !jsonObj.get("resourceNames").isJsonArray()) { + if (jsonObj.get("resourceNames") != null && !jsonObj.get("resourceNames").isJsonNull() && !jsonObj.get("resourceNames").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `resourceNames` to be an array in the JSON string but got `%s`", jsonObj.get("resourceNames").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("resources") != null && !jsonObj.get("resources").isJsonArray()) { + if (jsonObj.get("resources") != null && !jsonObj.get("resources").isJsonNull() && !jsonObj.get("resources").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `resources` to be an array in the JSON string but got `%s`", jsonObj.get("resources").toString())); } // ensure the required json array is present @@ -316,9 +309,9 @@ public void write(JsonWriter out, V1ResourceRule value) throws IOException { @Override public V1ResourceRule read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -345,3 +338,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Role.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Role.java index c05889e2f6..20ad77fae7 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Role.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Role.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1PolicyRule; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1Role implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -69,13 +69,12 @@ public class V1Role implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_RULES = "rules"; @SerializedName(SERIALIZED_NAME_RULES) - private List rules; + private List rules = new ArrayList<>(); public V1Role() { } public V1Role apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -89,14 +88,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1Role kind(String kind) { - this.kind = kind; return this; } @@ -110,14 +107,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1Role metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -131,14 +126,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V1Role rules(List rules) { - this.rules = rules; return this; } @@ -160,7 +153,6 @@ public List getRules() { return rules; } - public void setRules(List rules) { this.rules = rules; } @@ -227,25 +219,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1Role + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1Role */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1Role.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1Role.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1Role is not found in the empty JSON string", V1Role.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1Role.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1Role` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1Role` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -254,7 +247,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } if (jsonObj.get("rules") != null && !jsonObj.get("rules").isJsonNull()) { JsonArray jsonArrayrules = jsonObj.getAsJsonArray("rules"); @@ -266,7 +259,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `rules` (array) for (int i = 0; i < jsonArrayrules.size(); i++) { - V1PolicyRule.validateJsonObject(jsonArrayrules.get(i).getAsJsonObject()); + V1PolicyRule.validateJsonElement(jsonArrayrules.get(i)); }; } } @@ -292,9 +285,9 @@ public void write(JsonWriter out, V1Role value) throws IOException { @Override public V1Role read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -321,3 +314,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1RoleBinding.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1RoleBinding.java index d276b2945f..c525f8f65b 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1RoleBinding.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1RoleBinding.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -24,6 +24,7 @@ import io.kubernetes.client.openapi.models.V1RoleRef; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -46,7 +47,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -54,7 +54,7 @@ /** * 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. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1RoleBinding implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -74,13 +74,12 @@ public class V1RoleBinding implements io.kubernetes.client.common.KubernetesObje public static final String SERIALIZED_NAME_SUBJECTS = "subjects"; @SerializedName(SERIALIZED_NAME_SUBJECTS) - private List subjects; + private List subjects = new ArrayList<>(); public V1RoleBinding() { } public V1RoleBinding apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -94,14 +93,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1RoleBinding kind(String kind) { - this.kind = kind; return this; } @@ -115,14 +112,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1RoleBinding metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -136,14 +131,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V1RoleBinding roleRef(V1RoleRef roleRef) { - this.roleRef = roleRef; return this; } @@ -157,14 +150,12 @@ public V1RoleRef getRoleRef() { return roleRef; } - public void setRoleRef(V1RoleRef roleRef) { this.roleRef = roleRef; } public V1RoleBinding subjects(List subjects) { - this.subjects = subjects; return this; } @@ -186,7 +177,6 @@ public List getSubjects() { return subjects; } - public void setSubjects(List subjects) { this.subjects = subjects; } @@ -257,32 +247,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1RoleBinding + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1RoleBinding */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1RoleBinding.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1RoleBinding.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1RoleBinding is not found in the empty JSON string", V1RoleBinding.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1RoleBinding.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1RoleBinding` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1RoleBinding` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1RoleBinding.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -291,10 +282,10 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } // validate the required field `roleRef` - V1RoleRef.validateJsonObject(jsonObj.getAsJsonObject("roleRef")); + V1RoleRef.validateJsonElement(jsonObj.get("roleRef")); if (jsonObj.get("subjects") != null && !jsonObj.get("subjects").isJsonNull()) { JsonArray jsonArraysubjects = jsonObj.getAsJsonArray("subjects"); if (jsonArraysubjects != null) { @@ -305,7 +296,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `subjects` (array) for (int i = 0; i < jsonArraysubjects.size(); i++) { - RbacV1Subject.validateJsonObject(jsonArraysubjects.get(i).getAsJsonObject()); + RbacV1Subject.validateJsonElement(jsonArraysubjects.get(i)); }; } } @@ -331,9 +322,9 @@ public void write(JsonWriter out, V1RoleBinding value) throws IOException { @Override public V1RoleBinding read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -360,3 +351,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1RoleBindingList.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1RoleBindingList.java index acb98c482e..65676b4e65 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1RoleBindingList.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1RoleBindingList.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1RoleBinding; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * RoleBindingList is a collection of RoleBindings */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1RoleBindingList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -75,7 +75,6 @@ public V1RoleBindingList() { } public V1RoleBindingList apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -89,14 +88,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1RoleBindingList items(List items) { - this.items = items; return this; } @@ -118,14 +115,12 @@ public List getItems() { return items; } - public void setItems(List items) { this.items = items; } public V1RoleBindingList kind(String kind) { - this.kind = kind; return this; } @@ -139,14 +134,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1RoleBindingList metadata(V1ListMeta metadata) { - this.metadata = metadata; return this; } @@ -160,7 +153,6 @@ public V1ListMeta getMetadata() { return metadata; } - public void setMetadata(V1ListMeta metadata) { this.metadata = metadata; } @@ -228,32 +220,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1RoleBindingList + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1RoleBindingList */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1RoleBindingList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1RoleBindingList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1RoleBindingList is not found in the empty JSON string", V1RoleBindingList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1RoleBindingList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1RoleBindingList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1RoleBindingList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1RoleBindingList.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -265,14 +258,14 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); // validate the required field `items` (array) for (int i = 0; i < jsonArrayitems.size(); i++) { - V1RoleBinding.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject()); + V1RoleBinding.validateJsonElement(jsonArrayitems.get(i)); }; if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ListMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ListMeta.validateJsonElement(jsonObj.get("metadata")); } } @@ -296,9 +289,9 @@ public void write(JsonWriter out, V1RoleBindingList value) throws IOException { @Override public V1RoleBindingList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -325,3 +318,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1RoleList.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1RoleList.java index 3ca616f428..21bb6ec681 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1RoleList.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1RoleList.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1Role; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * RoleList is a collection of Roles */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1RoleList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -75,7 +75,6 @@ public V1RoleList() { } public V1RoleList apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -89,14 +88,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1RoleList items(List items) { - this.items = items; return this; } @@ -118,14 +115,12 @@ public List getItems() { return items; } - public void setItems(List items) { this.items = items; } public V1RoleList kind(String kind) { - this.kind = kind; return this; } @@ -139,14 +134,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1RoleList metadata(V1ListMeta metadata) { - this.metadata = metadata; return this; } @@ -160,7 +153,6 @@ public V1ListMeta getMetadata() { return metadata; } - public void setMetadata(V1ListMeta metadata) { this.metadata = metadata; } @@ -228,32 +220,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1RoleList + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1RoleList */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1RoleList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1RoleList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1RoleList is not found in the empty JSON string", V1RoleList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1RoleList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1RoleList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1RoleList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1RoleList.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -265,14 +258,14 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); // validate the required field `items` (array) for (int i = 0; i < jsonArrayitems.size(); i++) { - V1Role.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject()); + V1Role.validateJsonElement(jsonArrayitems.get(i)); }; if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ListMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ListMeta.validateJsonElement(jsonObj.get("metadata")); } } @@ -296,9 +289,9 @@ public void write(JsonWriter out, V1RoleList value) throws IOException { @Override public V1RoleList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -325,3 +318,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1RoleRef.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1RoleRef.java index 9196a34b25..ad26877fab 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1RoleRef.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1RoleRef.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * RoleRef contains information that points to the role being used */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1RoleRef { public static final String SERIALIZED_NAME_API_GROUP = "apiGroup"; @SerializedName(SERIALIZED_NAME_API_GROUP) @@ -67,7 +67,6 @@ public V1RoleRef() { } public V1RoleRef apiGroup(String apiGroup) { - this.apiGroup = apiGroup; return this; } @@ -81,14 +80,12 @@ public String getApiGroup() { return apiGroup; } - public void setApiGroup(String apiGroup) { this.apiGroup = apiGroup; } public V1RoleRef kind(String kind) { - this.kind = kind; return this; } @@ -102,14 +99,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1RoleRef name(String name) { - this.name = name; return this; } @@ -123,7 +118,6 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } @@ -190,32 +184,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1RoleRef + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1RoleRef */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1RoleRef.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1RoleRef.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1RoleRef is not found in the empty JSON string", V1RoleRef.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1RoleRef.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1RoleRef` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1RoleRef` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1RoleRef.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("apiGroup").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiGroup` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiGroup").toString())); } @@ -247,9 +242,9 @@ public void write(JsonWriter out, V1RoleRef value) throws IOException { @Override public V1RoleRef read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -276,3 +271,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1RollingUpdateDaemonSet.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1RollingUpdateDaemonSet.java index d7ddfc496e..4ea35a326a 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1RollingUpdateDaemonSet.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1RollingUpdateDaemonSet.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.custom.IntOrString; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * Spec to control the desired behavior of daemon set rolling update. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1RollingUpdateDaemonSet { public static final String SERIALIZED_NAME_MAX_SURGE = "maxSurge"; @SerializedName(SERIALIZED_NAME_MAX_SURGE) @@ -64,7 +64,6 @@ public V1RollingUpdateDaemonSet() { } public V1RollingUpdateDaemonSet maxSurge(IntOrString maxSurge) { - this.maxSurge = maxSurge; return this; } @@ -78,14 +77,12 @@ public IntOrString getMaxSurge() { return maxSurge; } - public void setMaxSurge(IntOrString maxSurge) { this.maxSurge = maxSurge; } public V1RollingUpdateDaemonSet maxUnavailable(IntOrString maxUnavailable) { - this.maxUnavailable = maxUnavailable; return this; } @@ -99,7 +96,6 @@ public IntOrString getMaxUnavailable() { return maxUnavailable; } - public void setMaxUnavailable(IntOrString maxUnavailable) { this.maxUnavailable = maxUnavailable; } @@ -160,25 +156,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1RollingUpdateDaemonSet + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1RollingUpdateDaemonSet */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1RollingUpdateDaemonSet.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1RollingUpdateDaemonSet.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1RollingUpdateDaemonSet is not found in the empty JSON string", V1RollingUpdateDaemonSet.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1RollingUpdateDaemonSet.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1RollingUpdateDaemonSet` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1RollingUpdateDaemonSet` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("maxSurge") != null && !jsonObj.get("maxSurge").isJsonNull()) && !jsonObj.get("maxSurge").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `maxSurge` to be a primitive type in the JSON string but got `%s`", jsonObj.get("maxSurge").toString())); } @@ -207,9 +204,9 @@ public void write(JsonWriter out, V1RollingUpdateDaemonSet value) throws IOExcep @Override public V1RollingUpdateDaemonSet read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -236,3 +233,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1RollingUpdateDeployment.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1RollingUpdateDeployment.java index 1cfe8b3f99..83c1dffd7f 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1RollingUpdateDeployment.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1RollingUpdateDeployment.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.custom.IntOrString; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * Spec to control the desired behavior of rolling update. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1RollingUpdateDeployment { public static final String SERIALIZED_NAME_MAX_SURGE = "maxSurge"; @SerializedName(SERIALIZED_NAME_MAX_SURGE) @@ -64,7 +64,6 @@ public V1RollingUpdateDeployment() { } public V1RollingUpdateDeployment maxSurge(IntOrString maxSurge) { - this.maxSurge = maxSurge; return this; } @@ -78,14 +77,12 @@ public IntOrString getMaxSurge() { return maxSurge; } - public void setMaxSurge(IntOrString maxSurge) { this.maxSurge = maxSurge; } public V1RollingUpdateDeployment maxUnavailable(IntOrString maxUnavailable) { - this.maxUnavailable = maxUnavailable; return this; } @@ -99,7 +96,6 @@ public IntOrString getMaxUnavailable() { return maxUnavailable; } - public void setMaxUnavailable(IntOrString maxUnavailable) { this.maxUnavailable = maxUnavailable; } @@ -160,25 +156,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1RollingUpdateDeployment + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1RollingUpdateDeployment */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1RollingUpdateDeployment.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1RollingUpdateDeployment.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1RollingUpdateDeployment is not found in the empty JSON string", V1RollingUpdateDeployment.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1RollingUpdateDeployment.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1RollingUpdateDeployment` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1RollingUpdateDeployment` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("maxSurge") != null && !jsonObj.get("maxSurge").isJsonNull()) && !jsonObj.get("maxSurge").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `maxSurge` to be a primitive type in the JSON string but got `%s`", jsonObj.get("maxSurge").toString())); } @@ -207,9 +204,9 @@ public void write(JsonWriter out, V1RollingUpdateDeployment value) throws IOExce @Override public V1RollingUpdateDeployment read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -236,3 +233,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1RollingUpdateStatefulSetStrategy.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1RollingUpdateStatefulSetStrategy.java index 6da4a25626..f105b3d974 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1RollingUpdateStatefulSetStrategy.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1RollingUpdateStatefulSetStrategy.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.custom.IntOrString; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1RollingUpdateStatefulSetStrategy { public static final String SERIALIZED_NAME_MAX_UNAVAILABLE = "maxUnavailable"; @SerializedName(SERIALIZED_NAME_MAX_UNAVAILABLE) @@ -64,7 +64,6 @@ public V1RollingUpdateStatefulSetStrategy() { } public V1RollingUpdateStatefulSetStrategy maxUnavailable(IntOrString maxUnavailable) { - this.maxUnavailable = maxUnavailable; return this; } @@ -78,14 +77,12 @@ public IntOrString getMaxUnavailable() { return maxUnavailable; } - public void setMaxUnavailable(IntOrString maxUnavailable) { this.maxUnavailable = maxUnavailable; } public V1RollingUpdateStatefulSetStrategy partition(Integer partition) { - this.partition = partition; return this; } @@ -99,7 +96,6 @@ public Integer getPartition() { return partition; } - public void setPartition(Integer partition) { this.partition = partition; } @@ -160,25 +156,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1RollingUpdateStatefulSetStrategy + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1RollingUpdateStatefulSetStrategy */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1RollingUpdateStatefulSetStrategy.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1RollingUpdateStatefulSetStrategy.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1RollingUpdateStatefulSetStrategy is not found in the empty JSON string", V1RollingUpdateStatefulSetStrategy.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1RollingUpdateStatefulSetStrategy.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1RollingUpdateStatefulSetStrategy` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1RollingUpdateStatefulSetStrategy` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("maxUnavailable") != null && !jsonObj.get("maxUnavailable").isJsonNull()) && !jsonObj.get("maxUnavailable").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `maxUnavailable` to be a primitive type in the JSON string but got `%s`", jsonObj.get("maxUnavailable").toString())); } @@ -204,9 +201,9 @@ public void write(JsonWriter out, V1RollingUpdateStatefulSetStrategy value) thro @Override public V1RollingUpdateStatefulSetStrategy read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -233,3 +230,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1RuleWithOperations.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1RuleWithOperations.java index af2be73577..04a0beb8e9 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1RuleWithOperations.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1RuleWithOperations.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -43,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -51,23 +51,23 @@ /** * RuleWithOperations is a tuple of Operations and Resources. It is recommended to make sure that all the tuple expansions are valid. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1RuleWithOperations { public static final String SERIALIZED_NAME_API_GROUPS = "apiGroups"; @SerializedName(SERIALIZED_NAME_API_GROUPS) - private List apiGroups; + private List apiGroups = new ArrayList<>(); public static final String SERIALIZED_NAME_API_VERSIONS = "apiVersions"; @SerializedName(SERIALIZED_NAME_API_VERSIONS) - private List apiVersions; + private List apiVersions = new ArrayList<>(); public static final String SERIALIZED_NAME_OPERATIONS = "operations"; @SerializedName(SERIALIZED_NAME_OPERATIONS) - private List operations; + private List operations = new ArrayList<>(); public static final String SERIALIZED_NAME_RESOURCES = "resources"; @SerializedName(SERIALIZED_NAME_RESOURCES) - private List resources; + private List resources = new ArrayList<>(); public static final String SERIALIZED_NAME_SCOPE = "scope"; @SerializedName(SERIALIZED_NAME_SCOPE) @@ -77,7 +77,6 @@ public V1RuleWithOperations() { } public V1RuleWithOperations apiGroups(List apiGroups) { - this.apiGroups = apiGroups; return this; } @@ -99,14 +98,12 @@ public List getApiGroups() { return apiGroups; } - public void setApiGroups(List apiGroups) { this.apiGroups = apiGroups; } public V1RuleWithOperations apiVersions(List apiVersions) { - this.apiVersions = apiVersions; return this; } @@ -128,14 +125,12 @@ public List getApiVersions() { return apiVersions; } - public void setApiVersions(List apiVersions) { this.apiVersions = apiVersions; } public V1RuleWithOperations operations(List operations) { - this.operations = operations; return this; } @@ -157,14 +152,12 @@ public List getOperations() { return operations; } - public void setOperations(List operations) { this.operations = operations; } public V1RuleWithOperations resources(List resources) { - this.resources = resources; return this; } @@ -186,14 +179,12 @@ public List getResources() { return resources; } - public void setResources(List resources) { this.resources = resources; } public V1RuleWithOperations scope(String scope) { - this.scope = scope; return this; } @@ -207,7 +198,6 @@ public String getScope() { return scope; } - public void setScope(String scope) { this.scope = scope; } @@ -277,39 +267,40 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1RuleWithOperations + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1RuleWithOperations */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1RuleWithOperations.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1RuleWithOperations.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1RuleWithOperations is not found in the empty JSON string", V1RuleWithOperations.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1RuleWithOperations.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1RuleWithOperations` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1RuleWithOperations` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the optional json data is an array if present - if (jsonObj.get("apiGroups") != null && !jsonObj.get("apiGroups").isJsonArray()) { + if (jsonObj.get("apiGroups") != null && !jsonObj.get("apiGroups").isJsonNull() && !jsonObj.get("apiGroups").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `apiGroups` to be an array in the JSON string but got `%s`", jsonObj.get("apiGroups").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("apiVersions") != null && !jsonObj.get("apiVersions").isJsonArray()) { + if (jsonObj.get("apiVersions") != null && !jsonObj.get("apiVersions").isJsonNull() && !jsonObj.get("apiVersions").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersions` to be an array in the JSON string but got `%s`", jsonObj.get("apiVersions").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("operations") != null && !jsonObj.get("operations").isJsonArray()) { + if (jsonObj.get("operations") != null && !jsonObj.get("operations").isJsonNull() && !jsonObj.get("operations").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `operations` to be an array in the JSON string but got `%s`", jsonObj.get("operations").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("resources") != null && !jsonObj.get("resources").isJsonArray()) { + if (jsonObj.get("resources") != null && !jsonObj.get("resources").isJsonNull() && !jsonObj.get("resources").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `resources` to be an array in the JSON string but got `%s`", jsonObj.get("resources").toString())); } if ((jsonObj.get("scope") != null && !jsonObj.get("scope").isJsonNull()) && !jsonObj.get("scope").isJsonPrimitive()) { @@ -337,9 +328,9 @@ public void write(JsonWriter out, V1RuleWithOperations value) throws IOException @Override public V1RuleWithOperations read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -366,3 +357,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1RuntimeClass.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1RuntimeClass.java index d7fe2eab51..b3b0296e4c 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1RuntimeClass.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1RuntimeClass.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1Overhead; import io.kubernetes.client.openapi.models.V1Scheduling; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * RuntimeClass defines a class of container runtime supported in the cluster. The RuntimeClass is used to determine which container runtime is used to run all containers in a pod. RuntimeClasses are manually defined by a user or cluster provisioner, and referenced in the PodSpec. The Kubelet is responsible for resolving the RuntimeClassName reference before running the pod. For more details, see https://kubernetes.io/docs/concepts/containers/runtime-class/ */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1RuntimeClass implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -82,7 +82,6 @@ public V1RuntimeClass() { } public V1RuntimeClass apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -96,14 +95,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1RuntimeClass handler(String handler) { - this.handler = handler; return this; } @@ -117,14 +114,12 @@ public String getHandler() { return handler; } - public void setHandler(String handler) { this.handler = handler; } public V1RuntimeClass kind(String kind) { - this.kind = kind; return this; } @@ -138,14 +133,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1RuntimeClass metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -159,14 +152,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V1RuntimeClass overhead(V1Overhead overhead) { - this.overhead = overhead; return this; } @@ -180,14 +171,12 @@ public V1Overhead getOverhead() { return overhead; } - public void setOverhead(V1Overhead overhead) { this.overhead = overhead; } public V1RuntimeClass scheduling(V1Scheduling scheduling) { - this.scheduling = scheduling; return this; } @@ -201,7 +190,6 @@ public V1Scheduling getScheduling() { return scheduling; } - public void setScheduling(V1Scheduling scheduling) { this.scheduling = scheduling; } @@ -275,32 +263,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1RuntimeClass + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1RuntimeClass */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1RuntimeClass.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1RuntimeClass.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1RuntimeClass is not found in the empty JSON string", V1RuntimeClass.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1RuntimeClass.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1RuntimeClass` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1RuntimeClass` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1RuntimeClass.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -312,15 +301,15 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } // validate the optional field `overhead` if (jsonObj.get("overhead") != null && !jsonObj.get("overhead").isJsonNull()) { - V1Overhead.validateJsonObject(jsonObj.getAsJsonObject("overhead")); + V1Overhead.validateJsonElement(jsonObj.get("overhead")); } // validate the optional field `scheduling` if (jsonObj.get("scheduling") != null && !jsonObj.get("scheduling").isJsonNull()) { - V1Scheduling.validateJsonObject(jsonObj.getAsJsonObject("scheduling")); + V1Scheduling.validateJsonElement(jsonObj.get("scheduling")); } } @@ -344,9 +333,9 @@ public void write(JsonWriter out, V1RuntimeClass value) throws IOException { @Override public V1RuntimeClass read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -373,3 +362,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1RuntimeClassList.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1RuntimeClassList.java index dcda13733e..5522eb93dc 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1RuntimeClassList.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1RuntimeClassList.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1RuntimeClass; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * RuntimeClassList is a list of RuntimeClass objects. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1RuntimeClassList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -75,7 +75,6 @@ public V1RuntimeClassList() { } public V1RuntimeClassList apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -89,14 +88,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1RuntimeClassList items(List items) { - this.items = items; return this; } @@ -118,14 +115,12 @@ public List getItems() { return items; } - public void setItems(List items) { this.items = items; } public V1RuntimeClassList kind(String kind) { - this.kind = kind; return this; } @@ -139,14 +134,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1RuntimeClassList metadata(V1ListMeta metadata) { - this.metadata = metadata; return this; } @@ -160,7 +153,6 @@ public V1ListMeta getMetadata() { return metadata; } - public void setMetadata(V1ListMeta metadata) { this.metadata = metadata; } @@ -228,32 +220,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1RuntimeClassList + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1RuntimeClassList */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1RuntimeClassList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1RuntimeClassList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1RuntimeClassList is not found in the empty JSON string", V1RuntimeClassList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1RuntimeClassList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1RuntimeClassList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1RuntimeClassList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1RuntimeClassList.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -265,14 +258,14 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); // validate the required field `items` (array) for (int i = 0; i < jsonArrayitems.size(); i++) { - V1RuntimeClass.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject()); + V1RuntimeClass.validateJsonElement(jsonArrayitems.get(i)); }; if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ListMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ListMeta.validateJsonElement(jsonObj.get("metadata")); } } @@ -296,9 +289,9 @@ public void write(JsonWriter out, V1RuntimeClassList value) throws IOException { @Override public V1RuntimeClassList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -325,3 +318,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SELinuxOptions.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SELinuxOptions.java index 30c63b4b28..e6e10c367e 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SELinuxOptions.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SELinuxOptions.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * SELinuxOptions are the labels to be applied to the container */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1SELinuxOptions { public static final String SERIALIZED_NAME_LEVEL = "level"; @SerializedName(SERIALIZED_NAME_LEVEL) @@ -71,7 +71,6 @@ public V1SELinuxOptions() { } public V1SELinuxOptions level(String level) { - this.level = level; return this; } @@ -85,14 +84,12 @@ public String getLevel() { return level; } - public void setLevel(String level) { this.level = level; } public V1SELinuxOptions role(String role) { - this.role = role; return this; } @@ -106,14 +103,12 @@ public String getRole() { return role; } - public void setRole(String role) { this.role = role; } public V1SELinuxOptions type(String type) { - this.type = type; return this; } @@ -127,14 +122,12 @@ public String getType() { return type; } - public void setType(String type) { this.type = type; } public V1SELinuxOptions user(String user) { - this.user = user; return this; } @@ -148,7 +141,6 @@ public String getUser() { return user; } - public void setUser(String user) { this.user = user; } @@ -215,25 +207,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1SELinuxOptions + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1SELinuxOptions */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1SELinuxOptions.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1SELinuxOptions.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1SELinuxOptions is not found in the empty JSON string", V1SELinuxOptions.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1SELinuxOptions.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1SELinuxOptions` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1SELinuxOptions` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("level") != null && !jsonObj.get("level").isJsonNull()) && !jsonObj.get("level").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `level` to be a primitive type in the JSON string but got `%s`", jsonObj.get("level").toString())); } @@ -268,9 +261,9 @@ public void write(JsonWriter out, V1SELinuxOptions value) throws IOException { @Override public V1SELinuxOptions read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -297,3 +290,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Scale.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Scale.java index e7e36eb357..0e09634f57 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Scale.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Scale.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1ScaleSpec; import io.kubernetes.client.openapi.models.V1ScaleStatus; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * Scale represents a scaling request for a resource. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1Scale implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -78,7 +78,6 @@ public V1Scale() { } public V1Scale apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -92,14 +91,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1Scale kind(String kind) { - this.kind = kind; return this; } @@ -113,14 +110,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1Scale metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -134,14 +129,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V1Scale spec(V1ScaleSpec spec) { - this.spec = spec; return this; } @@ -155,14 +148,12 @@ public V1ScaleSpec getSpec() { return spec; } - public void setSpec(V1ScaleSpec spec) { this.spec = spec; } public V1Scale status(V1ScaleStatus status) { - this.status = status; return this; } @@ -176,7 +167,6 @@ public V1ScaleStatus getStatus() { return status; } - public void setStatus(V1ScaleStatus status) { this.status = status; } @@ -246,25 +236,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1Scale + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1Scale */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1Scale.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1Scale.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1Scale is not found in the empty JSON string", V1Scale.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1Scale.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1Scale` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1Scale` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -273,15 +264,15 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } // validate the optional field `spec` if (jsonObj.get("spec") != null && !jsonObj.get("spec").isJsonNull()) { - V1ScaleSpec.validateJsonObject(jsonObj.getAsJsonObject("spec")); + V1ScaleSpec.validateJsonElement(jsonObj.get("spec")); } // validate the optional field `status` if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { - V1ScaleStatus.validateJsonObject(jsonObj.getAsJsonObject("status")); + V1ScaleStatus.validateJsonElement(jsonObj.get("status")); } } @@ -305,9 +296,9 @@ public void write(JsonWriter out, V1Scale value) throws IOException { @Override public V1Scale read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -334,3 +325,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ScaleIOPersistentVolumeSource.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ScaleIOPersistentVolumeSource.java index 64a95ef8d1..aa5a971075 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ScaleIOPersistentVolumeSource.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ScaleIOPersistentVolumeSource.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.openapi.models.V1SecretReference; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * ScaleIOPersistentVolumeSource represents a persistent ScaleIO volume */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ScaleIOPersistentVolumeSource { public static final String SERIALIZED_NAME_FS_TYPE = "fsType"; @SerializedName(SERIALIZED_NAME_FS_TYPE) @@ -96,7 +96,6 @@ public V1ScaleIOPersistentVolumeSource() { } public V1ScaleIOPersistentVolumeSource fsType(String fsType) { - this.fsType = fsType; return this; } @@ -110,14 +109,12 @@ public String getFsType() { return fsType; } - public void setFsType(String fsType) { this.fsType = fsType; } public V1ScaleIOPersistentVolumeSource gateway(String gateway) { - this.gateway = gateway; return this; } @@ -131,14 +128,12 @@ public String getGateway() { return gateway; } - public void setGateway(String gateway) { this.gateway = gateway; } public V1ScaleIOPersistentVolumeSource protectionDomain(String protectionDomain) { - this.protectionDomain = protectionDomain; return this; } @@ -152,14 +147,12 @@ public String getProtectionDomain() { return protectionDomain; } - public void setProtectionDomain(String protectionDomain) { this.protectionDomain = protectionDomain; } public V1ScaleIOPersistentVolumeSource readOnly(Boolean readOnly) { - this.readOnly = readOnly; return this; } @@ -173,14 +166,12 @@ public Boolean getReadOnly() { return readOnly; } - public void setReadOnly(Boolean readOnly) { this.readOnly = readOnly; } public V1ScaleIOPersistentVolumeSource secretRef(V1SecretReference secretRef) { - this.secretRef = secretRef; return this; } @@ -194,14 +185,12 @@ public V1SecretReference getSecretRef() { return secretRef; } - public void setSecretRef(V1SecretReference secretRef) { this.secretRef = secretRef; } public V1ScaleIOPersistentVolumeSource sslEnabled(Boolean sslEnabled) { - this.sslEnabled = sslEnabled; return this; } @@ -215,14 +204,12 @@ public Boolean getSslEnabled() { return sslEnabled; } - public void setSslEnabled(Boolean sslEnabled) { this.sslEnabled = sslEnabled; } public V1ScaleIOPersistentVolumeSource storageMode(String storageMode) { - this.storageMode = storageMode; return this; } @@ -236,14 +223,12 @@ public String getStorageMode() { return storageMode; } - public void setStorageMode(String storageMode) { this.storageMode = storageMode; } public V1ScaleIOPersistentVolumeSource storagePool(String storagePool) { - this.storagePool = storagePool; return this; } @@ -257,14 +242,12 @@ public String getStoragePool() { return storagePool; } - public void setStoragePool(String storagePool) { this.storagePool = storagePool; } public V1ScaleIOPersistentVolumeSource system(String system) { - this.system = system; return this; } @@ -278,14 +261,12 @@ public String getSystem() { return system; } - public void setSystem(String system) { this.system = system; } public V1ScaleIOPersistentVolumeSource volumeName(String volumeName) { - this.volumeName = volumeName; return this; } @@ -299,7 +280,6 @@ public String getVolumeName() { return volumeName; } - public void setVolumeName(String volumeName) { this.volumeName = volumeName; } @@ -387,32 +367,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ScaleIOPersistentVolumeSource + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ScaleIOPersistentVolumeSource */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ScaleIOPersistentVolumeSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ScaleIOPersistentVolumeSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ScaleIOPersistentVolumeSource is not found in the empty JSON string", V1ScaleIOPersistentVolumeSource.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ScaleIOPersistentVolumeSource.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ScaleIOPersistentVolumeSource` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ScaleIOPersistentVolumeSource` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1ScaleIOPersistentVolumeSource.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("fsType") != null && !jsonObj.get("fsType").isJsonNull()) && !jsonObj.get("fsType").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `fsType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fsType").toString())); } @@ -423,7 +404,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("Expected the field `protectionDomain` to be a primitive type in the JSON string but got `%s`", jsonObj.get("protectionDomain").toString())); } // validate the required field `secretRef` - V1SecretReference.validateJsonObject(jsonObj.getAsJsonObject("secretRef")); + V1SecretReference.validateJsonElement(jsonObj.get("secretRef")); if ((jsonObj.get("storageMode") != null && !jsonObj.get("storageMode").isJsonNull()) && !jsonObj.get("storageMode").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `storageMode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("storageMode").toString())); } @@ -458,9 +439,9 @@ public void write(JsonWriter out, V1ScaleIOPersistentVolumeSource value) throws @Override public V1ScaleIOPersistentVolumeSource read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -487,3 +468,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ScaleIOVolumeSource.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ScaleIOVolumeSource.java index 76e691f65e..fb35baa1ec 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ScaleIOVolumeSource.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ScaleIOVolumeSource.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.openapi.models.V1LocalObjectReference; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * ScaleIOVolumeSource represents a persistent ScaleIO volume */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ScaleIOVolumeSource { public static final String SERIALIZED_NAME_FS_TYPE = "fsType"; @SerializedName(SERIALIZED_NAME_FS_TYPE) @@ -96,7 +96,6 @@ public V1ScaleIOVolumeSource() { } public V1ScaleIOVolumeSource fsType(String fsType) { - this.fsType = fsType; return this; } @@ -110,14 +109,12 @@ public String getFsType() { return fsType; } - public void setFsType(String fsType) { this.fsType = fsType; } public V1ScaleIOVolumeSource gateway(String gateway) { - this.gateway = gateway; return this; } @@ -131,14 +128,12 @@ public String getGateway() { return gateway; } - public void setGateway(String gateway) { this.gateway = gateway; } public V1ScaleIOVolumeSource protectionDomain(String protectionDomain) { - this.protectionDomain = protectionDomain; return this; } @@ -152,14 +147,12 @@ public String getProtectionDomain() { return protectionDomain; } - public void setProtectionDomain(String protectionDomain) { this.protectionDomain = protectionDomain; } public V1ScaleIOVolumeSource readOnly(Boolean readOnly) { - this.readOnly = readOnly; return this; } @@ -173,14 +166,12 @@ public Boolean getReadOnly() { return readOnly; } - public void setReadOnly(Boolean readOnly) { this.readOnly = readOnly; } public V1ScaleIOVolumeSource secretRef(V1LocalObjectReference secretRef) { - this.secretRef = secretRef; return this; } @@ -194,14 +185,12 @@ public V1LocalObjectReference getSecretRef() { return secretRef; } - public void setSecretRef(V1LocalObjectReference secretRef) { this.secretRef = secretRef; } public V1ScaleIOVolumeSource sslEnabled(Boolean sslEnabled) { - this.sslEnabled = sslEnabled; return this; } @@ -215,14 +204,12 @@ public Boolean getSslEnabled() { return sslEnabled; } - public void setSslEnabled(Boolean sslEnabled) { this.sslEnabled = sslEnabled; } public V1ScaleIOVolumeSource storageMode(String storageMode) { - this.storageMode = storageMode; return this; } @@ -236,14 +223,12 @@ public String getStorageMode() { return storageMode; } - public void setStorageMode(String storageMode) { this.storageMode = storageMode; } public V1ScaleIOVolumeSource storagePool(String storagePool) { - this.storagePool = storagePool; return this; } @@ -257,14 +242,12 @@ public String getStoragePool() { return storagePool; } - public void setStoragePool(String storagePool) { this.storagePool = storagePool; } public V1ScaleIOVolumeSource system(String system) { - this.system = system; return this; } @@ -278,14 +261,12 @@ public String getSystem() { return system; } - public void setSystem(String system) { this.system = system; } public V1ScaleIOVolumeSource volumeName(String volumeName) { - this.volumeName = volumeName; return this; } @@ -299,7 +280,6 @@ public String getVolumeName() { return volumeName; } - public void setVolumeName(String volumeName) { this.volumeName = volumeName; } @@ -387,32 +367,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ScaleIOVolumeSource + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ScaleIOVolumeSource */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ScaleIOVolumeSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ScaleIOVolumeSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ScaleIOVolumeSource is not found in the empty JSON string", V1ScaleIOVolumeSource.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ScaleIOVolumeSource.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ScaleIOVolumeSource` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ScaleIOVolumeSource` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1ScaleIOVolumeSource.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("fsType") != null && !jsonObj.get("fsType").isJsonNull()) && !jsonObj.get("fsType").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `fsType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fsType").toString())); } @@ -423,7 +404,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("Expected the field `protectionDomain` to be a primitive type in the JSON string but got `%s`", jsonObj.get("protectionDomain").toString())); } // validate the required field `secretRef` - V1LocalObjectReference.validateJsonObject(jsonObj.getAsJsonObject("secretRef")); + V1LocalObjectReference.validateJsonElement(jsonObj.get("secretRef")); if ((jsonObj.get("storageMode") != null && !jsonObj.get("storageMode").isJsonNull()) && !jsonObj.get("storageMode").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `storageMode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("storageMode").toString())); } @@ -458,9 +439,9 @@ public void write(JsonWriter out, V1ScaleIOVolumeSource value) throws IOExceptio @Override public V1ScaleIOVolumeSource read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -487,3 +468,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ScaleSpec.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ScaleSpec.java index 875f9d8345..6c2eeaf157 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ScaleSpec.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ScaleSpec.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * ScaleSpec describes the attributes of a scale subresource. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ScaleSpec { public static final String SERIALIZED_NAME_REPLICAS = "replicas"; @SerializedName(SERIALIZED_NAME_REPLICAS) @@ -59,7 +59,6 @@ public V1ScaleSpec() { } public V1ScaleSpec replicas(Integer replicas) { - this.replicas = replicas; return this; } @@ -73,7 +72,6 @@ public Integer getReplicas() { return replicas; } - public void setReplicas(Integer replicas) { this.replicas = replicas; } @@ -131,25 +129,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ScaleSpec + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ScaleSpec */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ScaleSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ScaleSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ScaleSpec is not found in the empty JSON string", V1ScaleSpec.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ScaleSpec.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ScaleSpec` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ScaleSpec` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -172,9 +171,9 @@ public void write(JsonWriter out, V1ScaleSpec value) throws IOException { @Override public V1ScaleSpec read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -201,3 +200,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ScaleStatus.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ScaleStatus.java index d2b12253fc..d385b65688 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ScaleStatus.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ScaleStatus.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * ScaleStatus represents the current status of a scale subresource. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ScaleStatus { public static final String SERIALIZED_NAME_REPLICAS = "replicas"; @SerializedName(SERIALIZED_NAME_REPLICAS) @@ -63,7 +63,6 @@ public V1ScaleStatus() { } public V1ScaleStatus replicas(Integer replicas) { - this.replicas = replicas; return this; } @@ -77,14 +76,12 @@ public Integer getReplicas() { return replicas; } - public void setReplicas(Integer replicas) { this.replicas = replicas; } public V1ScaleStatus selector(String selector) { - this.selector = selector; return this; } @@ -98,7 +95,6 @@ public String getSelector() { return selector; } - public void setSelector(String selector) { this.selector = selector; } @@ -160,32 +156,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ScaleStatus + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ScaleStatus */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ScaleStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ScaleStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ScaleStatus is not found in the empty JSON string", V1ScaleStatus.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ScaleStatus.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ScaleStatus` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ScaleStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1ScaleStatus.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("selector") != null && !jsonObj.get("selector").isJsonNull()) && !jsonObj.get("selector").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `selector` to be a primitive type in the JSON string but got `%s`", jsonObj.get("selector").toString())); } @@ -211,9 +208,9 @@ public void write(JsonWriter out, V1ScaleStatus value) throws IOException { @Override public V1ScaleStatus read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -240,3 +237,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Scheduling.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Scheduling.java index 2424681682..fe40cf959e 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Scheduling.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Scheduling.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1Toleration; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -46,7 +47,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -54,7 +54,7 @@ /** * Scheduling specifies the scheduling constraints for nodes supporting a RuntimeClass. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1Scheduling { public static final String SERIALIZED_NAME_NODE_SELECTOR = "nodeSelector"; @SerializedName(SERIALIZED_NAME_NODE_SELECTOR) @@ -62,13 +62,12 @@ public class V1Scheduling { public static final String SERIALIZED_NAME_TOLERATIONS = "tolerations"; @SerializedName(SERIALIZED_NAME_TOLERATIONS) - private List tolerations; + private List tolerations = new ArrayList<>(); public V1Scheduling() { } public V1Scheduling nodeSelector(Map nodeSelector) { - this.nodeSelector = nodeSelector; return this; } @@ -90,14 +89,12 @@ public Map getNodeSelector() { return nodeSelector; } - public void setNodeSelector(Map nodeSelector) { this.nodeSelector = nodeSelector; } public V1Scheduling tolerations(List tolerations) { - this.tolerations = tolerations; return this; } @@ -119,7 +116,6 @@ public List getTolerations() { return tolerations; } - public void setTolerations(List tolerations) { this.tolerations = tolerations; } @@ -180,25 +176,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1Scheduling + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1Scheduling */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1Scheduling.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1Scheduling.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1Scheduling is not found in the empty JSON string", V1Scheduling.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1Scheduling.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1Scheduling` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1Scheduling` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (jsonObj.get("tolerations") != null && !jsonObj.get("tolerations").isJsonNull()) { JsonArray jsonArraytolerations = jsonObj.getAsJsonArray("tolerations"); if (jsonArraytolerations != null) { @@ -209,7 +206,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `tolerations` (array) for (int i = 0; i < jsonArraytolerations.size(); i++) { - V1Toleration.validateJsonObject(jsonArraytolerations.get(i).getAsJsonObject()); + V1Toleration.validateJsonElement(jsonArraytolerations.get(i)); }; } } @@ -235,9 +232,9 @@ public void write(JsonWriter out, V1Scheduling value) throws IOException { @Override public V1Scheduling read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -264,3 +261,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ScopeSelector.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ScopeSelector.java index ee6b17861b..325150394d 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ScopeSelector.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ScopeSelector.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1ScopedResourceSelectorRequirement; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,17 +52,16 @@ /** * A scope selector represents the AND of the selectors represented by the scoped-resource selector requirements. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ScopeSelector { public static final String SERIALIZED_NAME_MATCH_EXPRESSIONS = "matchExpressions"; @SerializedName(SERIALIZED_NAME_MATCH_EXPRESSIONS) - private List matchExpressions; + private List matchExpressions = new ArrayList<>(); public V1ScopeSelector() { } public V1ScopeSelector matchExpressions(List matchExpressions) { - this.matchExpressions = matchExpressions; return this; } @@ -84,7 +83,6 @@ public List getMatchExpressions() { return matchExpressions; } - public void setMatchExpressions(List matchExpressions) { this.matchExpressions = matchExpressions; } @@ -142,25 +140,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ScopeSelector + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ScopeSelector */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ScopeSelector.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ScopeSelector.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ScopeSelector is not found in the empty JSON string", V1ScopeSelector.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ScopeSelector.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ScopeSelector` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ScopeSelector` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (jsonObj.get("matchExpressions") != null && !jsonObj.get("matchExpressions").isJsonNull()) { JsonArray jsonArraymatchExpressions = jsonObj.getAsJsonArray("matchExpressions"); if (jsonArraymatchExpressions != null) { @@ -171,7 +170,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `matchExpressions` (array) for (int i = 0; i < jsonArraymatchExpressions.size(); i++) { - V1ScopedResourceSelectorRequirement.validateJsonObject(jsonArraymatchExpressions.get(i).getAsJsonObject()); + V1ScopedResourceSelectorRequirement.validateJsonElement(jsonArraymatchExpressions.get(i)); }; } } @@ -197,9 +196,9 @@ public void write(JsonWriter out, V1ScopeSelector value) throws IOException { @Override public V1ScopeSelector read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -226,3 +225,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ScopedResourceSelectorRequirement.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ScopedResourceSelectorRequirement.java index 023c1aaefa..ff2ff1141d 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ScopedResourceSelectorRequirement.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ScopedResourceSelectorRequirement.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -43,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -51,7 +51,7 @@ /** * A scoped-resource selector requirement is a selector that contains values, a scope name, and an operator that relates the scope name and values. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ScopedResourceSelectorRequirement { public static final String SERIALIZED_NAME_OPERATOR = "operator"; @SerializedName(SERIALIZED_NAME_OPERATOR) @@ -63,13 +63,12 @@ public class V1ScopedResourceSelectorRequirement { public static final String SERIALIZED_NAME_VALUES = "values"; @SerializedName(SERIALIZED_NAME_VALUES) - private List values; + private List values = new ArrayList<>(); public V1ScopedResourceSelectorRequirement() { } public V1ScopedResourceSelectorRequirement operator(String operator) { - this.operator = operator; return this; } @@ -83,14 +82,12 @@ public String getOperator() { return operator; } - public void setOperator(String operator) { this.operator = operator; } public V1ScopedResourceSelectorRequirement scopeName(String scopeName) { - this.scopeName = scopeName; return this; } @@ -104,14 +101,12 @@ public String getScopeName() { return scopeName; } - public void setScopeName(String scopeName) { this.scopeName = scopeName; } public V1ScopedResourceSelectorRequirement values(List values) { - this.values = values; return this; } @@ -133,7 +128,6 @@ public List getValues() { return values; } - public void setValues(List values) { this.values = values; } @@ -199,32 +193,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ScopedResourceSelectorRequirement + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ScopedResourceSelectorRequirement */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ScopedResourceSelectorRequirement.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ScopedResourceSelectorRequirement.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ScopedResourceSelectorRequirement is not found in the empty JSON string", V1ScopedResourceSelectorRequirement.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ScopedResourceSelectorRequirement.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ScopedResourceSelectorRequirement` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ScopedResourceSelectorRequirement` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1ScopedResourceSelectorRequirement.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("operator").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `operator` to be a primitive type in the JSON string but got `%s`", jsonObj.get("operator").toString())); } @@ -232,7 +227,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("Expected the field `scopeName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("scopeName").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("values") != null && !jsonObj.get("values").isJsonArray()) { + if (jsonObj.get("values") != null && !jsonObj.get("values").isJsonNull() && !jsonObj.get("values").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `values` to be an array in the JSON string but got `%s`", jsonObj.get("values").toString())); } } @@ -257,9 +252,9 @@ public void write(JsonWriter out, V1ScopedResourceSelectorRequirement value) thr @Override public V1ScopedResourceSelectorRequirement read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -286,3 +281,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SeccompProfile.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SeccompProfile.java index e3556f0fd1..21509e7577 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SeccompProfile.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SeccompProfile.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * SeccompProfile defines a pod/container's seccomp profile settings. Only one profile source may be set. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1SeccompProfile { public static final String SERIALIZED_NAME_LOCALHOST_PROFILE = "localhostProfile"; @SerializedName(SERIALIZED_NAME_LOCALHOST_PROFILE) @@ -63,7 +63,6 @@ public V1SeccompProfile() { } public V1SeccompProfile localhostProfile(String localhostProfile) { - this.localhostProfile = localhostProfile; return this; } @@ -77,14 +76,12 @@ public String getLocalhostProfile() { return localhostProfile; } - public void setLocalhostProfile(String localhostProfile) { this.localhostProfile = localhostProfile; } public V1SeccompProfile type(String type) { - this.type = type; return this; } @@ -98,7 +95,6 @@ public String getType() { return type; } - public void setType(String type) { this.type = type; } @@ -160,32 +156,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1SeccompProfile + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1SeccompProfile */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1SeccompProfile.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1SeccompProfile.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1SeccompProfile is not found in the empty JSON string", V1SeccompProfile.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1SeccompProfile.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1SeccompProfile` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1SeccompProfile` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1SeccompProfile.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("localhostProfile") != null && !jsonObj.get("localhostProfile").isJsonNull()) && !jsonObj.get("localhostProfile").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `localhostProfile` to be a primitive type in the JSON string but got `%s`", jsonObj.get("localhostProfile").toString())); } @@ -214,9 +211,9 @@ public void write(JsonWriter out, V1SeccompProfile value) throws IOException { @Override public V1SeccompProfile read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -243,3 +240,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Secret.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Secret.java index 42808e7710..f9eb77efa7 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Secret.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Secret.java @@ -1,27 +1,27 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.kubernetes.client.custom.MapUtils; import io.kubernetes.client.openapi.models.V1ObjectMeta; import java.io.IOException; +import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -45,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +52,7 @@ /** * Secret holds secret data of a certain type. The total bytes of the values in the Data field must be less than MaxSecretSize bytes. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1Secret implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -87,7 +86,6 @@ public V1Secret() { } public V1Secret apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -101,14 +99,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1Secret data(Map data) { - this.data = data; return this; } @@ -130,14 +126,12 @@ public Map getData() { return data; } - public void setData(Map data) { this.data = data; } public V1Secret immutable(Boolean immutable) { - this.immutable = immutable; return this; } @@ -151,14 +145,12 @@ public Boolean getImmutable() { return immutable; } - public void setImmutable(Boolean immutable) { this.immutable = immutable; } public V1Secret kind(String kind) { - this.kind = kind; return this; } @@ -172,14 +164,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1Secret metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -193,14 +183,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V1Secret stringData(Map stringData) { - this.stringData = stringData; return this; } @@ -222,14 +210,12 @@ public Map getStringData() { return stringData; } - public void setStringData(Map stringData) { this.stringData = stringData; } public V1Secret type(String type) { - this.type = type; return this; } @@ -243,7 +229,6 @@ public String getType() { return type; } - public void setType(String type) { this.type = type; } @@ -260,7 +245,7 @@ public boolean equals(Object o) { } V1Secret v1Secret = (V1Secret) o; return Objects.equals(this.apiVersion, v1Secret.apiVersion) && - MapUtils.equals(this.data, v1Secret.data) && + Objects.equals(this.data, v1Secret.data) && Objects.equals(this.immutable, v1Secret.immutable) && Objects.equals(this.kind, v1Secret.kind) && Objects.equals(this.metadata, v1Secret.metadata) && @@ -319,25 +304,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1Secret + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1Secret */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1Secret.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1Secret.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1Secret is not found in the empty JSON string", V1Secret.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1Secret.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1Secret` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1Secret` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -346,7 +332,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); @@ -373,9 +359,9 @@ public void write(JsonWriter out, V1Secret value) throws IOException { @Override public V1Secret read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -402,3 +388,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SecretEnvSource.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SecretEnvSource.java index 0e0efc5e62..3baf045b31 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SecretEnvSource.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SecretEnvSource.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * 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. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1SecretEnvSource { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) @@ -63,13 +63,12 @@ public V1SecretEnvSource() { } public V1SecretEnvSource name(String name) { - this.name = name; return this; } /** - * Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + * Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names * @return name **/ @jakarta.annotation.Nullable @@ -77,14 +76,12 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } public V1SecretEnvSource optional(Boolean optional) { - this.optional = optional; return this; } @@ -98,7 +95,6 @@ public Boolean getOptional() { return optional; } - public void setOptional(Boolean optional) { this.optional = optional; } @@ -159,25 +155,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1SecretEnvSource + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1SecretEnvSource */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1SecretEnvSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1SecretEnvSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1SecretEnvSource is not found in the empty JSON string", V1SecretEnvSource.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1SecretEnvSource.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1SecretEnvSource` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1SecretEnvSource` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } @@ -203,9 +200,9 @@ public void write(JsonWriter out, V1SecretEnvSource value) throws IOException { @Override public V1SecretEnvSource read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -232,3 +229,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SecretKeySelector.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SecretKeySelector.java index 56598a73bf..c19ec34fa6 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SecretKeySelector.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SecretKeySelector.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * SecretKeySelector selects a key of a Secret. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1SecretKeySelector { public static final String SERIALIZED_NAME_KEY = "key"; @SerializedName(SERIALIZED_NAME_KEY) @@ -67,7 +67,6 @@ public V1SecretKeySelector() { } public V1SecretKeySelector key(String key) { - this.key = key; return this; } @@ -81,20 +80,18 @@ public String getKey() { return key; } - public void setKey(String key) { this.key = key; } public V1SecretKeySelector name(String name) { - this.name = name; return this; } /** - * Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + * Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names * @return name **/ @jakarta.annotation.Nullable @@ -102,14 +99,12 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } public V1SecretKeySelector optional(Boolean optional) { - this.optional = optional; return this; } @@ -123,7 +118,6 @@ public Boolean getOptional() { return optional; } - public void setOptional(Boolean optional) { this.optional = optional; } @@ -188,32 +182,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1SecretKeySelector + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1SecretKeySelector */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1SecretKeySelector.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1SecretKeySelector.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1SecretKeySelector is not found in the empty JSON string", V1SecretKeySelector.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1SecretKeySelector.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1SecretKeySelector` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1SecretKeySelector` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1SecretKeySelector.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("key").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `key` to be a primitive type in the JSON string but got `%s`", jsonObj.get("key").toString())); } @@ -242,9 +237,9 @@ public void write(JsonWriter out, V1SecretKeySelector value) throws IOException @Override public V1SecretKeySelector read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -271,3 +266,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SecretList.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SecretList.java index 26da7da80c..5b5b60529a 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SecretList.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SecretList.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1Secret; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * SecretList is a list of Secret. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1SecretList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -75,7 +75,6 @@ public V1SecretList() { } public V1SecretList apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -89,14 +88,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1SecretList items(List items) { - this.items = items; return this; } @@ -118,14 +115,12 @@ public List getItems() { return items; } - public void setItems(List items) { this.items = items; } public V1SecretList kind(String kind) { - this.kind = kind; return this; } @@ -139,14 +134,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1SecretList metadata(V1ListMeta metadata) { - this.metadata = metadata; return this; } @@ -160,7 +153,6 @@ public V1ListMeta getMetadata() { return metadata; } - public void setMetadata(V1ListMeta metadata) { this.metadata = metadata; } @@ -228,32 +220,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1SecretList + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1SecretList */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1SecretList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1SecretList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1SecretList is not found in the empty JSON string", V1SecretList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1SecretList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1SecretList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1SecretList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1SecretList.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -265,14 +258,14 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); // validate the required field `items` (array) for (int i = 0; i < jsonArrayitems.size(); i++) { - V1Secret.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject()); + V1Secret.validateJsonElement(jsonArrayitems.get(i)); }; if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ListMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ListMeta.validateJsonElement(jsonObj.get("metadata")); } } @@ -296,9 +289,9 @@ public void write(JsonWriter out, V1SecretList value) throws IOException { @Override public V1SecretList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -325,3 +318,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SecretProjection.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SecretProjection.java index 1531f95be5..4413d3a4cd 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SecretProjection.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SecretProjection.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1KeyToPath; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,11 +52,11 @@ /** * 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. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1SecretProjection { public static final String SERIALIZED_NAME_ITEMS = "items"; @SerializedName(SERIALIZED_NAME_ITEMS) - private List items; + private List items = new ArrayList<>(); public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) @@ -70,7 +70,6 @@ public V1SecretProjection() { } public V1SecretProjection items(List items) { - this.items = items; return this; } @@ -92,20 +91,18 @@ public List getItems() { return items; } - public void setItems(List items) { this.items = items; } public V1SecretProjection name(String name) { - this.name = name; return this; } /** - * Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + * Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names * @return name **/ @jakarta.annotation.Nullable @@ -113,14 +110,12 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } public V1SecretProjection optional(Boolean optional) { - this.optional = optional; return this; } @@ -134,7 +129,6 @@ public Boolean getOptional() { return optional; } - public void setOptional(Boolean optional) { this.optional = optional; } @@ -198,25 +192,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1SecretProjection + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1SecretProjection */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1SecretProjection.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1SecretProjection.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1SecretProjection is not found in the empty JSON string", V1SecretProjection.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1SecretProjection.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1SecretProjection` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1SecretProjection` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (jsonObj.get("items") != null && !jsonObj.get("items").isJsonNull()) { JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); if (jsonArrayitems != null) { @@ -227,7 +222,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `items` (array) for (int i = 0; i < jsonArrayitems.size(); i++) { - V1KeyToPath.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject()); + V1KeyToPath.validateJsonElement(jsonArrayitems.get(i)); }; } } @@ -256,9 +251,9 @@ public void write(JsonWriter out, V1SecretProjection value) throws IOException { @Override public V1SecretProjection read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -285,3 +280,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SecretReference.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SecretReference.java index 789cd24df1..c2d039f3b3 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SecretReference.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SecretReference.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * SecretReference represents a Secret Reference. It has enough information to retrieve secret in any namespace */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1SecretReference { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) @@ -63,7 +63,6 @@ public V1SecretReference() { } public V1SecretReference name(String name) { - this.name = name; return this; } @@ -77,14 +76,12 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } public V1SecretReference namespace(String namespace) { - this.namespace = namespace; return this; } @@ -98,7 +95,6 @@ public String getNamespace() { return namespace; } - public void setNamespace(String namespace) { this.namespace = namespace; } @@ -159,25 +155,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1SecretReference + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1SecretReference */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1SecretReference.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1SecretReference.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1SecretReference is not found in the empty JSON string", V1SecretReference.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1SecretReference.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1SecretReference` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1SecretReference` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } @@ -206,9 +203,9 @@ public void write(JsonWriter out, V1SecretReference value) throws IOException { @Override public V1SecretReference read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -235,3 +232,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SecretVolumeSource.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SecretVolumeSource.java index 81ba5809b2..3b37faddab 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SecretVolumeSource.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SecretVolumeSource.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1KeyToPath; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * 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. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1SecretVolumeSource { public static final String SERIALIZED_NAME_DEFAULT_MODE = "defaultMode"; @SerializedName(SERIALIZED_NAME_DEFAULT_MODE) @@ -60,7 +60,7 @@ public class V1SecretVolumeSource { public static final String SERIALIZED_NAME_ITEMS = "items"; @SerializedName(SERIALIZED_NAME_ITEMS) - private List items; + private List items = new ArrayList<>(); public static final String SERIALIZED_NAME_OPTIONAL = "optional"; @SerializedName(SERIALIZED_NAME_OPTIONAL) @@ -74,7 +74,6 @@ public V1SecretVolumeSource() { } public V1SecretVolumeSource defaultMode(Integer defaultMode) { - this.defaultMode = defaultMode; return this; } @@ -88,14 +87,12 @@ public Integer getDefaultMode() { return defaultMode; } - public void setDefaultMode(Integer defaultMode) { this.defaultMode = defaultMode; } public V1SecretVolumeSource items(List items) { - this.items = items; return this; } @@ -117,14 +114,12 @@ public List getItems() { return items; } - public void setItems(List items) { this.items = items; } public V1SecretVolumeSource optional(Boolean optional) { - this.optional = optional; return this; } @@ -138,14 +133,12 @@ public Boolean getOptional() { return optional; } - public void setOptional(Boolean optional) { this.optional = optional; } public V1SecretVolumeSource secretName(String secretName) { - this.secretName = secretName; return this; } @@ -159,7 +152,6 @@ public String getSecretName() { return secretName; } - public void setSecretName(String secretName) { this.secretName = secretName; } @@ -226,25 +218,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1SecretVolumeSource + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1SecretVolumeSource */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1SecretVolumeSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1SecretVolumeSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1SecretVolumeSource is not found in the empty JSON string", V1SecretVolumeSource.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1SecretVolumeSource.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1SecretVolumeSource` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1SecretVolumeSource` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (jsonObj.get("items") != null && !jsonObj.get("items").isJsonNull()) { JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); if (jsonArrayitems != null) { @@ -255,7 +248,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `items` (array) for (int i = 0; i < jsonArrayitems.size(); i++) { - V1KeyToPath.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject()); + V1KeyToPath.validateJsonElement(jsonArrayitems.get(i)); }; } } @@ -284,9 +277,9 @@ public void write(JsonWriter out, V1SecretVolumeSource value) throws IOException @Override public V1SecretVolumeSource read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -313,3 +306,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SecurityContext.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SecurityContext.java index a82ecb4b9c..a230bd16fa 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SecurityContext.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SecurityContext.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -25,6 +25,7 @@ import io.kubernetes.client.openapi.models.V1SeccompProfile; import io.kubernetes.client.openapi.models.V1WindowsSecurityContextOptions; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -46,7 +47,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -54,7 +54,7 @@ /** * 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. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1SecurityContext { public static final String SERIALIZED_NAME_ALLOW_PRIVILEGE_ESCALATION = "allowPrivilegeEscalation"; @SerializedName(SERIALIZED_NAME_ALLOW_PRIVILEGE_ESCALATION) @@ -108,7 +108,6 @@ public V1SecurityContext() { } public V1SecurityContext allowPrivilegeEscalation(Boolean allowPrivilegeEscalation) { - this.allowPrivilegeEscalation = allowPrivilegeEscalation; return this; } @@ -122,14 +121,12 @@ public Boolean getAllowPrivilegeEscalation() { return allowPrivilegeEscalation; } - public void setAllowPrivilegeEscalation(Boolean allowPrivilegeEscalation) { this.allowPrivilegeEscalation = allowPrivilegeEscalation; } public V1SecurityContext appArmorProfile(V1AppArmorProfile appArmorProfile) { - this.appArmorProfile = appArmorProfile; return this; } @@ -143,14 +140,12 @@ public V1AppArmorProfile getAppArmorProfile() { return appArmorProfile; } - public void setAppArmorProfile(V1AppArmorProfile appArmorProfile) { this.appArmorProfile = appArmorProfile; } public V1SecurityContext capabilities(V1Capabilities capabilities) { - this.capabilities = capabilities; return this; } @@ -164,14 +159,12 @@ public V1Capabilities getCapabilities() { return capabilities; } - public void setCapabilities(V1Capabilities capabilities) { this.capabilities = capabilities; } public V1SecurityContext privileged(Boolean privileged) { - this.privileged = privileged; return this; } @@ -185,14 +178,12 @@ public Boolean getPrivileged() { return privileged; } - public void setPrivileged(Boolean privileged) { this.privileged = privileged; } public V1SecurityContext procMount(String procMount) { - this.procMount = procMount; return this; } @@ -206,14 +197,12 @@ public String getProcMount() { return procMount; } - public void setProcMount(String procMount) { this.procMount = procMount; } public V1SecurityContext readOnlyRootFilesystem(Boolean readOnlyRootFilesystem) { - this.readOnlyRootFilesystem = readOnlyRootFilesystem; return this; } @@ -227,14 +216,12 @@ public Boolean getReadOnlyRootFilesystem() { return readOnlyRootFilesystem; } - public void setReadOnlyRootFilesystem(Boolean readOnlyRootFilesystem) { this.readOnlyRootFilesystem = readOnlyRootFilesystem; } public V1SecurityContext runAsGroup(Long runAsGroup) { - this.runAsGroup = runAsGroup; return this; } @@ -248,14 +235,12 @@ public Long getRunAsGroup() { return runAsGroup; } - public void setRunAsGroup(Long runAsGroup) { this.runAsGroup = runAsGroup; } public V1SecurityContext runAsNonRoot(Boolean runAsNonRoot) { - this.runAsNonRoot = runAsNonRoot; return this; } @@ -269,14 +254,12 @@ public Boolean getRunAsNonRoot() { return runAsNonRoot; } - public void setRunAsNonRoot(Boolean runAsNonRoot) { this.runAsNonRoot = runAsNonRoot; } public V1SecurityContext runAsUser(Long runAsUser) { - this.runAsUser = runAsUser; return this; } @@ -290,14 +273,12 @@ public Long getRunAsUser() { return runAsUser; } - public void setRunAsUser(Long runAsUser) { this.runAsUser = runAsUser; } public V1SecurityContext seLinuxOptions(V1SELinuxOptions seLinuxOptions) { - this.seLinuxOptions = seLinuxOptions; return this; } @@ -311,14 +292,12 @@ public V1SELinuxOptions getSeLinuxOptions() { return seLinuxOptions; } - public void setSeLinuxOptions(V1SELinuxOptions seLinuxOptions) { this.seLinuxOptions = seLinuxOptions; } public V1SecurityContext seccompProfile(V1SeccompProfile seccompProfile) { - this.seccompProfile = seccompProfile; return this; } @@ -332,14 +311,12 @@ public V1SeccompProfile getSeccompProfile() { return seccompProfile; } - public void setSeccompProfile(V1SeccompProfile seccompProfile) { this.seccompProfile = seccompProfile; } public V1SecurityContext windowsOptions(V1WindowsSecurityContextOptions windowsOptions) { - this.windowsOptions = windowsOptions; return this; } @@ -353,7 +330,6 @@ public V1WindowsSecurityContextOptions getWindowsOptions() { return windowsOptions; } - public void setWindowsOptions(V1WindowsSecurityContextOptions windowsOptions) { this.windowsOptions = windowsOptions; } @@ -444,47 +420,48 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1SecurityContext + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1SecurityContext */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1SecurityContext.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1SecurityContext.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1SecurityContext is not found in the empty JSON string", V1SecurityContext.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1SecurityContext.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1SecurityContext` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1SecurityContext` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `appArmorProfile` if (jsonObj.get("appArmorProfile") != null && !jsonObj.get("appArmorProfile").isJsonNull()) { - V1AppArmorProfile.validateJsonObject(jsonObj.getAsJsonObject("appArmorProfile")); + V1AppArmorProfile.validateJsonElement(jsonObj.get("appArmorProfile")); } // validate the optional field `capabilities` if (jsonObj.get("capabilities") != null && !jsonObj.get("capabilities").isJsonNull()) { - V1Capabilities.validateJsonObject(jsonObj.getAsJsonObject("capabilities")); + V1Capabilities.validateJsonElement(jsonObj.get("capabilities")); } if ((jsonObj.get("procMount") != null && !jsonObj.get("procMount").isJsonNull()) && !jsonObj.get("procMount").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `procMount` to be a primitive type in the JSON string but got `%s`", jsonObj.get("procMount").toString())); } // validate the optional field `seLinuxOptions` if (jsonObj.get("seLinuxOptions") != null && !jsonObj.get("seLinuxOptions").isJsonNull()) { - V1SELinuxOptions.validateJsonObject(jsonObj.getAsJsonObject("seLinuxOptions")); + V1SELinuxOptions.validateJsonElement(jsonObj.get("seLinuxOptions")); } // validate the optional field `seccompProfile` if (jsonObj.get("seccompProfile") != null && !jsonObj.get("seccompProfile").isJsonNull()) { - V1SeccompProfile.validateJsonObject(jsonObj.getAsJsonObject("seccompProfile")); + V1SeccompProfile.validateJsonElement(jsonObj.get("seccompProfile")); } // validate the optional field `windowsOptions` if (jsonObj.get("windowsOptions") != null && !jsonObj.get("windowsOptions").isJsonNull()) { - V1WindowsSecurityContextOptions.validateJsonObject(jsonObj.getAsJsonObject("windowsOptions")); + V1WindowsSecurityContextOptions.validateJsonElement(jsonObj.get("windowsOptions")); } } @@ -508,9 +485,9 @@ public void write(JsonWriter out, V1SecurityContext value) throws IOException { @Override public V1SecurityContext read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -537,3 +514,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SelectableField.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SelectableField.java index 622922f9e9..dc6cd7f539 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SelectableField.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SelectableField.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * SelectableField specifies the JSON path of a field that may be used with field selectors. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1SelectableField { public static final String SERIALIZED_NAME_JSON_PATH = "jsonPath"; @SerializedName(SERIALIZED_NAME_JSON_PATH) @@ -59,7 +59,6 @@ public V1SelectableField() { } public V1SelectableField jsonPath(String jsonPath) { - this.jsonPath = jsonPath; return this; } @@ -73,7 +72,6 @@ public String getJsonPath() { return jsonPath; } - public void setJsonPath(String jsonPath) { this.jsonPath = jsonPath; } @@ -132,32 +130,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1SelectableField + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1SelectableField */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1SelectableField.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1SelectableField.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1SelectableField is not found in the empty JSON string", V1SelectableField.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1SelectableField.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1SelectableField` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1SelectableField` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1SelectableField.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("jsonPath").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `jsonPath` to be a primitive type in the JSON string but got `%s`", jsonObj.get("jsonPath").toString())); } @@ -183,9 +182,9 @@ public void write(JsonWriter out, V1SelectableField value) throws IOException { @Override public V1SelectableField read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -212,3 +211,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectAccessReview.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectAccessReview.java index 31fa692a3e..cf2e109d1a 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectAccessReview.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectAccessReview.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1SelfSubjectAccessReviewSpec; import io.kubernetes.client.openapi.models.V1SubjectAccessReviewStatus; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * 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 */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1SelfSubjectAccessReview implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -78,7 +78,6 @@ public V1SelfSubjectAccessReview() { } public V1SelfSubjectAccessReview apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -92,14 +91,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1SelfSubjectAccessReview kind(String kind) { - this.kind = kind; return this; } @@ -113,14 +110,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1SelfSubjectAccessReview metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -134,14 +129,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V1SelfSubjectAccessReview spec(V1SelfSubjectAccessReviewSpec spec) { - this.spec = spec; return this; } @@ -155,14 +148,12 @@ public V1SelfSubjectAccessReviewSpec getSpec() { return spec; } - public void setSpec(V1SelfSubjectAccessReviewSpec spec) { this.spec = spec; } public V1SelfSubjectAccessReview status(V1SubjectAccessReviewStatus status) { - this.status = status; return this; } @@ -176,7 +167,6 @@ public V1SubjectAccessReviewStatus getStatus() { return status; } - public void setStatus(V1SubjectAccessReviewStatus status) { this.status = status; } @@ -247,32 +237,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1SelfSubjectAccessReview + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1SelfSubjectAccessReview */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1SelfSubjectAccessReview.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1SelfSubjectAccessReview.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1SelfSubjectAccessReview is not found in the empty JSON string", V1SelfSubjectAccessReview.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1SelfSubjectAccessReview.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1SelfSubjectAccessReview` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1SelfSubjectAccessReview` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1SelfSubjectAccessReview.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -281,13 +272,13 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } // validate the required field `spec` - V1SelfSubjectAccessReviewSpec.validateJsonObject(jsonObj.getAsJsonObject("spec")); + V1SelfSubjectAccessReviewSpec.validateJsonElement(jsonObj.get("spec")); // validate the optional field `status` if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { - V1SubjectAccessReviewStatus.validateJsonObject(jsonObj.getAsJsonObject("status")); + V1SubjectAccessReviewStatus.validateJsonElement(jsonObj.get("status")); } } @@ -311,9 +302,9 @@ public void write(JsonWriter out, V1SelfSubjectAccessReview value) throws IOExce @Override public V1SelfSubjectAccessReview read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -340,3 +331,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectAccessReviewSpec.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectAccessReviewSpec.java index 30b6360639..1abe546e88 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectAccessReviewSpec.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectAccessReviewSpec.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1NonResourceAttributes; import io.kubernetes.client.openapi.models.V1ResourceAttributes; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -43,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -51,7 +51,7 @@ /** * SelfSubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1SelfSubjectAccessReviewSpec { public static final String SERIALIZED_NAME_NON_RESOURCE_ATTRIBUTES = "nonResourceAttributes"; @SerializedName(SERIALIZED_NAME_NON_RESOURCE_ATTRIBUTES) @@ -65,7 +65,6 @@ public V1SelfSubjectAccessReviewSpec() { } public V1SelfSubjectAccessReviewSpec nonResourceAttributes(V1NonResourceAttributes nonResourceAttributes) { - this.nonResourceAttributes = nonResourceAttributes; return this; } @@ -79,14 +78,12 @@ public V1NonResourceAttributes getNonResourceAttributes() { return nonResourceAttributes; } - public void setNonResourceAttributes(V1NonResourceAttributes nonResourceAttributes) { this.nonResourceAttributes = nonResourceAttributes; } public V1SelfSubjectAccessReviewSpec resourceAttributes(V1ResourceAttributes resourceAttributes) { - this.resourceAttributes = resourceAttributes; return this; } @@ -100,7 +97,6 @@ public V1ResourceAttributes getResourceAttributes() { return resourceAttributes; } - public void setResourceAttributes(V1ResourceAttributes resourceAttributes) { this.resourceAttributes = resourceAttributes; } @@ -161,32 +157,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1SelfSubjectAccessReviewSpec + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1SelfSubjectAccessReviewSpec */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1SelfSubjectAccessReviewSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1SelfSubjectAccessReviewSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1SelfSubjectAccessReviewSpec is not found in the empty JSON string", V1SelfSubjectAccessReviewSpec.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1SelfSubjectAccessReviewSpec.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1SelfSubjectAccessReviewSpec` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1SelfSubjectAccessReviewSpec` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `nonResourceAttributes` if (jsonObj.get("nonResourceAttributes") != null && !jsonObj.get("nonResourceAttributes").isJsonNull()) { - V1NonResourceAttributes.validateJsonObject(jsonObj.getAsJsonObject("nonResourceAttributes")); + V1NonResourceAttributes.validateJsonElement(jsonObj.get("nonResourceAttributes")); } // validate the optional field `resourceAttributes` if (jsonObj.get("resourceAttributes") != null && !jsonObj.get("resourceAttributes").isJsonNull()) { - V1ResourceAttributes.validateJsonObject(jsonObj.getAsJsonObject("resourceAttributes")); + V1ResourceAttributes.validateJsonElement(jsonObj.get("resourceAttributes")); } } @@ -210,9 +207,9 @@ public void write(JsonWriter out, V1SelfSubjectAccessReviewSpec value) throws IO @Override public V1SelfSubjectAccessReviewSpec read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -239,3 +236,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectReview.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectReview.java index f9bf194195..34ae97015f 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectReview.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectReview.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1ObjectMeta; import io.kubernetes.client.openapi.models.V1SelfSubjectReviewStatus; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -43,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -51,7 +51,7 @@ /** * SelfSubjectReview contains the user information that the kube-apiserver has about the user making this request. When using impersonation, users will receive the user info of the user being impersonated. If impersonation or request header authentication is used, any extra keys will have their case ignored and returned as lowercase. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1SelfSubjectReview implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -73,7 +73,6 @@ public V1SelfSubjectReview() { } public V1SelfSubjectReview apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -87,14 +86,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1SelfSubjectReview kind(String kind) { - this.kind = kind; return this; } @@ -108,14 +105,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1SelfSubjectReview metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -129,14 +124,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V1SelfSubjectReview status(V1SelfSubjectReviewStatus status) { - this.status = status; return this; } @@ -150,7 +143,6 @@ public V1SelfSubjectReviewStatus getStatus() { return status; } - public void setStatus(V1SelfSubjectReviewStatus status) { this.status = status; } @@ -217,25 +209,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1SelfSubjectReview + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1SelfSubjectReview */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1SelfSubjectReview.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1SelfSubjectReview.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1SelfSubjectReview is not found in the empty JSON string", V1SelfSubjectReview.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1SelfSubjectReview.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1SelfSubjectReview` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1SelfSubjectReview` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -244,11 +237,11 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } // validate the optional field `status` if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { - V1SelfSubjectReviewStatus.validateJsonObject(jsonObj.getAsJsonObject("status")); + V1SelfSubjectReviewStatus.validateJsonElement(jsonObj.get("status")); } } @@ -272,9 +265,9 @@ public void write(JsonWriter out, V1SelfSubjectReview value) throws IOException @Override public V1SelfSubjectReview read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -301,3 +294,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectReviewStatus.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectReviewStatus.java index 0e51772abb..f21dbece3c 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectReviewStatus.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectReviewStatus.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.openapi.models.V1UserInfo; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * SelfSubjectReviewStatus is filled by the kube-apiserver and sent back to a user. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1SelfSubjectReviewStatus { public static final String SERIALIZED_NAME_USER_INFO = "userInfo"; @SerializedName(SERIALIZED_NAME_USER_INFO) @@ -60,7 +60,6 @@ public V1SelfSubjectReviewStatus() { } public V1SelfSubjectReviewStatus userInfo(V1UserInfo userInfo) { - this.userInfo = userInfo; return this; } @@ -74,7 +73,6 @@ public V1UserInfo getUserInfo() { return userInfo; } - public void setUserInfo(V1UserInfo userInfo) { this.userInfo = userInfo; } @@ -132,28 +130,29 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1SelfSubjectReviewStatus + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1SelfSubjectReviewStatus */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1SelfSubjectReviewStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1SelfSubjectReviewStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1SelfSubjectReviewStatus is not found in the empty JSON string", V1SelfSubjectReviewStatus.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1SelfSubjectReviewStatus.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1SelfSubjectReviewStatus` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1SelfSubjectReviewStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `userInfo` if (jsonObj.get("userInfo") != null && !jsonObj.get("userInfo").isJsonNull()) { - V1UserInfo.validateJsonObject(jsonObj.getAsJsonObject("userInfo")); + V1UserInfo.validateJsonElement(jsonObj.get("userInfo")); } } @@ -177,9 +176,9 @@ public void write(JsonWriter out, V1SelfSubjectReviewStatus value) throws IOExce @Override public V1SelfSubjectReviewStatus read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -206,3 +205,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectRulesReview.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectRulesReview.java index cfb0c4d18a..6051412efc 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectRulesReview.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectRulesReview.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1SelfSubjectRulesReviewSpec; import io.kubernetes.client.openapi.models.V1SubjectRulesReviewStatus; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * SelfSubjectRulesReview enumerates the set of actions the current user can perform within a namespace. The returned list of actions may be incomplete depending on the server's authorization mode, and any errors experienced during the evaluation. SelfSubjectRulesReview should be used by UIs to show/hide actions, or to quickly let an end user reason about their permissions. It should NOT Be used by external systems to drive authorization decisions as this raises confused deputy, cache lifetime/revocation, and correctness concerns. SubjectAccessReview, and LocalAccessReview are the correct way to defer authorization decisions to the API server. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1SelfSubjectRulesReview implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -78,7 +78,6 @@ public V1SelfSubjectRulesReview() { } public V1SelfSubjectRulesReview apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -92,14 +91,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1SelfSubjectRulesReview kind(String kind) { - this.kind = kind; return this; } @@ -113,14 +110,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1SelfSubjectRulesReview metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -134,14 +129,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V1SelfSubjectRulesReview spec(V1SelfSubjectRulesReviewSpec spec) { - this.spec = spec; return this; } @@ -155,14 +148,12 @@ public V1SelfSubjectRulesReviewSpec getSpec() { return spec; } - public void setSpec(V1SelfSubjectRulesReviewSpec spec) { this.spec = spec; } public V1SelfSubjectRulesReview status(V1SubjectRulesReviewStatus status) { - this.status = status; return this; } @@ -176,7 +167,6 @@ public V1SubjectRulesReviewStatus getStatus() { return status; } - public void setStatus(V1SubjectRulesReviewStatus status) { this.status = status; } @@ -247,32 +237,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1SelfSubjectRulesReview + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1SelfSubjectRulesReview */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1SelfSubjectRulesReview.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1SelfSubjectRulesReview.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1SelfSubjectRulesReview is not found in the empty JSON string", V1SelfSubjectRulesReview.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1SelfSubjectRulesReview.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1SelfSubjectRulesReview` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1SelfSubjectRulesReview` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1SelfSubjectRulesReview.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -281,13 +272,13 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } // validate the required field `spec` - V1SelfSubjectRulesReviewSpec.validateJsonObject(jsonObj.getAsJsonObject("spec")); + V1SelfSubjectRulesReviewSpec.validateJsonElement(jsonObj.get("spec")); // validate the optional field `status` if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { - V1SubjectRulesReviewStatus.validateJsonObject(jsonObj.getAsJsonObject("status")); + V1SubjectRulesReviewStatus.validateJsonElement(jsonObj.get("status")); } } @@ -311,9 +302,9 @@ public void write(JsonWriter out, V1SelfSubjectRulesReview value) throws IOExcep @Override public V1SelfSubjectRulesReview read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -340,3 +331,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectRulesReviewSpec.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectRulesReviewSpec.java index 069f96eb9f..e1e67ac789 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectRulesReviewSpec.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectRulesReviewSpec.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * SelfSubjectRulesReviewSpec defines the specification for SelfSubjectRulesReview. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1SelfSubjectRulesReviewSpec { public static final String SERIALIZED_NAME_NAMESPACE = "namespace"; @SerializedName(SERIALIZED_NAME_NAMESPACE) @@ -59,7 +59,6 @@ public V1SelfSubjectRulesReviewSpec() { } public V1SelfSubjectRulesReviewSpec namespace(String namespace) { - this.namespace = namespace; return this; } @@ -73,7 +72,6 @@ public String getNamespace() { return namespace; } - public void setNamespace(String namespace) { this.namespace = namespace; } @@ -131,25 +129,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1SelfSubjectRulesReviewSpec + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1SelfSubjectRulesReviewSpec */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1SelfSubjectRulesReviewSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1SelfSubjectRulesReviewSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1SelfSubjectRulesReviewSpec is not found in the empty JSON string", V1SelfSubjectRulesReviewSpec.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1SelfSubjectRulesReviewSpec.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1SelfSubjectRulesReviewSpec` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1SelfSubjectRulesReviewSpec` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("namespace") != null && !jsonObj.get("namespace").isJsonNull()) && !jsonObj.get("namespace").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `namespace` to be a primitive type in the JSON string but got `%s`", jsonObj.get("namespace").toString())); } @@ -175,9 +174,9 @@ public void write(JsonWriter out, V1SelfSubjectRulesReviewSpec value) throws IOE @Override public V1SelfSubjectRulesReviewSpec read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -204,3 +203,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ServerAddressByClientCIDR.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ServerAddressByClientCIDR.java index ae9e247742..5698a6591f 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ServerAddressByClientCIDR.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ServerAddressByClientCIDR.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * ServerAddressByClientCIDR helps the client to determine the server address that they should use, depending on the clientCIDR that they match. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ServerAddressByClientCIDR { public static final String SERIALIZED_NAME_CLIENT_C_I_D_R = "clientCIDR"; @SerializedName(SERIALIZED_NAME_CLIENT_C_I_D_R) @@ -63,7 +63,6 @@ public V1ServerAddressByClientCIDR() { } public V1ServerAddressByClientCIDR clientCIDR(String clientCIDR) { - this.clientCIDR = clientCIDR; return this; } @@ -77,14 +76,12 @@ public String getClientCIDR() { return clientCIDR; } - public void setClientCIDR(String clientCIDR) { this.clientCIDR = clientCIDR; } public V1ServerAddressByClientCIDR serverAddress(String serverAddress) { - this.serverAddress = serverAddress; return this; } @@ -98,7 +95,6 @@ public String getServerAddress() { return serverAddress; } - public void setServerAddress(String serverAddress) { this.serverAddress = serverAddress; } @@ -161,32 +157,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ServerAddressByClientCIDR + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ServerAddressByClientCIDR */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ServerAddressByClientCIDR.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ServerAddressByClientCIDR.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ServerAddressByClientCIDR is not found in the empty JSON string", V1ServerAddressByClientCIDR.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ServerAddressByClientCIDR.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ServerAddressByClientCIDR` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ServerAddressByClientCIDR` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1ServerAddressByClientCIDR.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("clientCIDR").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `clientCIDR` to be a primitive type in the JSON string but got `%s`", jsonObj.get("clientCIDR").toString())); } @@ -215,9 +212,9 @@ public void write(JsonWriter out, V1ServerAddressByClientCIDR value) throws IOEx @Override public V1ServerAddressByClientCIDR read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -244,3 +241,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Service.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Service.java index 600e2ab732..87d36665fd 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Service.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Service.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1ServiceSpec; import io.kubernetes.client.openapi.models.V1ServiceStatus; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * 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. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1Service implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -78,7 +78,6 @@ public V1Service() { } public V1Service apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -92,14 +91,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1Service kind(String kind) { - this.kind = kind; return this; } @@ -113,14 +110,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1Service metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -134,14 +129,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V1Service spec(V1ServiceSpec spec) { - this.spec = spec; return this; } @@ -155,14 +148,12 @@ public V1ServiceSpec getSpec() { return spec; } - public void setSpec(V1ServiceSpec spec) { this.spec = spec; } public V1Service status(V1ServiceStatus status) { - this.status = status; return this; } @@ -176,7 +167,6 @@ public V1ServiceStatus getStatus() { return status; } - public void setStatus(V1ServiceStatus status) { this.status = status; } @@ -246,25 +236,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1Service + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1Service */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1Service.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1Service.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1Service is not found in the empty JSON string", V1Service.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1Service.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1Service` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1Service` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -273,15 +264,15 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } // validate the optional field `spec` if (jsonObj.get("spec") != null && !jsonObj.get("spec").isJsonNull()) { - V1ServiceSpec.validateJsonObject(jsonObj.getAsJsonObject("spec")); + V1ServiceSpec.validateJsonElement(jsonObj.get("spec")); } // validate the optional field `status` if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { - V1ServiceStatus.validateJsonObject(jsonObj.getAsJsonObject("status")); + V1ServiceStatus.validateJsonElement(jsonObj.get("status")); } } @@ -305,9 +296,9 @@ public void write(JsonWriter out, V1Service value) throws IOException { @Override public V1Service read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -334,3 +325,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ServiceAccount.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ServiceAccount.java index e4eaec2f9f..8700277320 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ServiceAccount.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ServiceAccount.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -24,6 +24,7 @@ import io.kubernetes.client.openapi.models.V1ObjectReference; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -46,7 +47,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -54,7 +54,7 @@ /** * 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 */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ServiceAccount implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -66,7 +66,7 @@ public class V1ServiceAccount implements io.kubernetes.client.common.KubernetesO public static final String SERIALIZED_NAME_IMAGE_PULL_SECRETS = "imagePullSecrets"; @SerializedName(SERIALIZED_NAME_IMAGE_PULL_SECRETS) - private List imagePullSecrets; + private List imagePullSecrets = new ArrayList<>(); public static final String SERIALIZED_NAME_KIND = "kind"; @SerializedName(SERIALIZED_NAME_KIND) @@ -78,13 +78,12 @@ public class V1ServiceAccount implements io.kubernetes.client.common.KubernetesO public static final String SERIALIZED_NAME_SECRETS = "secrets"; @SerializedName(SERIALIZED_NAME_SECRETS) - private List secrets; + private List secrets = new ArrayList<>(); public V1ServiceAccount() { } public V1ServiceAccount apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -98,14 +97,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1ServiceAccount automountServiceAccountToken(Boolean automountServiceAccountToken) { - this.automountServiceAccountToken = automountServiceAccountToken; return this; } @@ -119,14 +116,12 @@ public Boolean getAutomountServiceAccountToken() { return automountServiceAccountToken; } - public void setAutomountServiceAccountToken(Boolean automountServiceAccountToken) { this.automountServiceAccountToken = automountServiceAccountToken; } public V1ServiceAccount imagePullSecrets(List imagePullSecrets) { - this.imagePullSecrets = imagePullSecrets; return this; } @@ -148,14 +143,12 @@ public List getImagePullSecrets() { return imagePullSecrets; } - public void setImagePullSecrets(List imagePullSecrets) { this.imagePullSecrets = imagePullSecrets; } public V1ServiceAccount kind(String kind) { - this.kind = kind; return this; } @@ -169,14 +162,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1ServiceAccount metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -190,14 +181,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V1ServiceAccount secrets(List secrets) { - this.secrets = secrets; return this; } @@ -219,7 +208,6 @@ public List getSecrets() { return secrets; } - public void setSecrets(List secrets) { this.secrets = secrets; } @@ -292,25 +280,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ServiceAccount + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ServiceAccount */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ServiceAccount.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ServiceAccount.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ServiceAccount is not found in the empty JSON string", V1ServiceAccount.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ServiceAccount.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ServiceAccount` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ServiceAccount` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -324,7 +313,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `imagePullSecrets` (array) for (int i = 0; i < jsonArrayimagePullSecrets.size(); i++) { - V1LocalObjectReference.validateJsonObject(jsonArrayimagePullSecrets.get(i).getAsJsonObject()); + V1LocalObjectReference.validateJsonElement(jsonArrayimagePullSecrets.get(i)); }; } } @@ -333,7 +322,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } if (jsonObj.get("secrets") != null && !jsonObj.get("secrets").isJsonNull()) { JsonArray jsonArraysecrets = jsonObj.getAsJsonArray("secrets"); @@ -345,7 +334,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `secrets` (array) for (int i = 0; i < jsonArraysecrets.size(); i++) { - V1ObjectReference.validateJsonObject(jsonArraysecrets.get(i).getAsJsonObject()); + V1ObjectReference.validateJsonElement(jsonArraysecrets.get(i)); }; } } @@ -371,9 +360,9 @@ public void write(JsonWriter out, V1ServiceAccount value) throws IOException { @Override public V1ServiceAccount read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -400,3 +389,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ServiceAccountList.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ServiceAccountList.java index d01185ad02..9795585bd8 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ServiceAccountList.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ServiceAccountList.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1ServiceAccount; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * ServiceAccountList is a list of ServiceAccount objects */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ServiceAccountList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -75,7 +75,6 @@ public V1ServiceAccountList() { } public V1ServiceAccountList apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -89,14 +88,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1ServiceAccountList items(List items) { - this.items = items; return this; } @@ -118,14 +115,12 @@ public List getItems() { return items; } - public void setItems(List items) { this.items = items; } public V1ServiceAccountList kind(String kind) { - this.kind = kind; return this; } @@ -139,14 +134,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1ServiceAccountList metadata(V1ListMeta metadata) { - this.metadata = metadata; return this; } @@ -160,7 +153,6 @@ public V1ListMeta getMetadata() { return metadata; } - public void setMetadata(V1ListMeta metadata) { this.metadata = metadata; } @@ -228,32 +220,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ServiceAccountList + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ServiceAccountList */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ServiceAccountList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ServiceAccountList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ServiceAccountList is not found in the empty JSON string", V1ServiceAccountList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ServiceAccountList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ServiceAccountList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ServiceAccountList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1ServiceAccountList.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -265,14 +258,14 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); // validate the required field `items` (array) for (int i = 0; i < jsonArrayitems.size(); i++) { - V1ServiceAccount.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject()); + V1ServiceAccount.validateJsonElement(jsonArrayitems.get(i)); }; if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ListMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ListMeta.validateJsonElement(jsonObj.get("metadata")); } } @@ -296,9 +289,9 @@ public void write(JsonWriter out, V1ServiceAccountList value) throws IOException @Override public V1ServiceAccountList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -325,3 +318,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ServiceAccountSubject.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ServiceAccountSubject.java index 7b62513011..7066715fe2 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ServiceAccountSubject.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ServiceAccountSubject.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * ServiceAccountSubject holds detailed information for service-account-kind subject. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ServiceAccountSubject { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) @@ -63,7 +63,6 @@ public V1ServiceAccountSubject() { } public V1ServiceAccountSubject name(String name) { - this.name = name; return this; } @@ -77,14 +76,12 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } public V1ServiceAccountSubject namespace(String namespace) { - this.namespace = namespace; return this; } @@ -98,7 +95,6 @@ public String getNamespace() { return namespace; } - public void setNamespace(String namespace) { this.namespace = namespace; } @@ -161,32 +157,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ServiceAccountSubject + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ServiceAccountSubject */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ServiceAccountSubject.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ServiceAccountSubject.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ServiceAccountSubject is not found in the empty JSON string", V1ServiceAccountSubject.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ServiceAccountSubject.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ServiceAccountSubject` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ServiceAccountSubject` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1ServiceAccountSubject.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } @@ -215,9 +212,9 @@ public void write(JsonWriter out, V1ServiceAccountSubject value) throws IOExcept @Override public V1ServiceAccountSubject read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -244,3 +241,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ServiceAccountTokenProjection.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ServiceAccountTokenProjection.java index 078148bb09..16309019ff 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ServiceAccountTokenProjection.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ServiceAccountTokenProjection.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * ServiceAccountTokenProjection represents a projected service account token volume. This projection can be used to insert a service account token into the pods runtime filesystem for use against APIs (Kubernetes API Server or otherwise). */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ServiceAccountTokenProjection { public static final String SERIALIZED_NAME_AUDIENCE = "audience"; @SerializedName(SERIALIZED_NAME_AUDIENCE) @@ -67,7 +67,6 @@ public V1ServiceAccountTokenProjection() { } public V1ServiceAccountTokenProjection audience(String audience) { - this.audience = audience; return this; } @@ -81,14 +80,12 @@ public String getAudience() { return audience; } - public void setAudience(String audience) { this.audience = audience; } public V1ServiceAccountTokenProjection expirationSeconds(Long expirationSeconds) { - this.expirationSeconds = expirationSeconds; return this; } @@ -102,14 +99,12 @@ public Long getExpirationSeconds() { return expirationSeconds; } - public void setExpirationSeconds(Long expirationSeconds) { this.expirationSeconds = expirationSeconds; } public V1ServiceAccountTokenProjection path(String path) { - this.path = path; return this; } @@ -123,7 +118,6 @@ public String getPath() { return path; } - public void setPath(String path) { this.path = path; } @@ -188,32 +182,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ServiceAccountTokenProjection + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ServiceAccountTokenProjection */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ServiceAccountTokenProjection.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ServiceAccountTokenProjection.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ServiceAccountTokenProjection is not found in the empty JSON string", V1ServiceAccountTokenProjection.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ServiceAccountTokenProjection.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ServiceAccountTokenProjection` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ServiceAccountTokenProjection` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1ServiceAccountTokenProjection.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("audience") != null && !jsonObj.get("audience").isJsonNull()) && !jsonObj.get("audience").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `audience` to be a primitive type in the JSON string but got `%s`", jsonObj.get("audience").toString())); } @@ -242,9 +237,9 @@ public void write(JsonWriter out, V1ServiceAccountTokenProjection value) throws @Override public V1ServiceAccountTokenProjection read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -271,3 +266,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ServiceBackendPort.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ServiceBackendPort.java index 49177a862d..b0c791383e 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ServiceBackendPort.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ServiceBackendPort.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * ServiceBackendPort is the service port being referenced. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ServiceBackendPort { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) @@ -63,7 +63,6 @@ public V1ServiceBackendPort() { } public V1ServiceBackendPort name(String name) { - this.name = name; return this; } @@ -77,14 +76,12 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } public V1ServiceBackendPort number(Integer number) { - this.number = number; return this; } @@ -98,7 +95,6 @@ public Integer getNumber() { return number; } - public void setNumber(Integer number) { this.number = number; } @@ -159,25 +155,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ServiceBackendPort + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ServiceBackendPort */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ServiceBackendPort.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ServiceBackendPort.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ServiceBackendPort is not found in the empty JSON string", V1ServiceBackendPort.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ServiceBackendPort.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ServiceBackendPort` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ServiceBackendPort` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } @@ -203,9 +200,9 @@ public void write(JsonWriter out, V1ServiceBackendPort value) throws IOException @Override public V1ServiceBackendPort read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -232,3 +229,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ServiceList.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ServiceList.java index 6613d21aa9..b1e2a05a2e 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ServiceList.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ServiceList.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1Service; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * ServiceList holds a list of services. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ServiceList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -75,7 +75,6 @@ public V1ServiceList() { } public V1ServiceList apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -89,14 +88,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1ServiceList items(List items) { - this.items = items; return this; } @@ -118,14 +115,12 @@ public List getItems() { return items; } - public void setItems(List items) { this.items = items; } public V1ServiceList kind(String kind) { - this.kind = kind; return this; } @@ -139,14 +134,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1ServiceList metadata(V1ListMeta metadata) { - this.metadata = metadata; return this; } @@ -160,7 +153,6 @@ public V1ListMeta getMetadata() { return metadata; } - public void setMetadata(V1ListMeta metadata) { this.metadata = metadata; } @@ -228,32 +220,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ServiceList + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ServiceList */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ServiceList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ServiceList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ServiceList is not found in the empty JSON string", V1ServiceList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ServiceList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ServiceList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ServiceList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1ServiceList.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -265,14 +258,14 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); // validate the required field `items` (array) for (int i = 0; i < jsonArrayitems.size(); i++) { - V1Service.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject()); + V1Service.validateJsonElement(jsonArrayitems.get(i)); }; if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ListMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ListMeta.validateJsonElement(jsonObj.get("metadata")); } } @@ -296,9 +289,9 @@ public void write(JsonWriter out, V1ServiceList value) throws IOException { @Override public V1ServiceList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -325,3 +318,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ServicePort.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ServicePort.java index 9345b1535e..58ea72cb20 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ServicePort.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ServicePort.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.custom.IntOrString; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * ServicePort contains information on service's port. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ServicePort { public static final String SERIALIZED_NAME_APP_PROTOCOL = "appProtocol"; @SerializedName(SERIALIZED_NAME_APP_PROTOCOL) @@ -80,7 +80,6 @@ public V1ServicePort() { } public V1ServicePort appProtocol(String appProtocol) { - this.appProtocol = appProtocol; return this; } @@ -94,14 +93,12 @@ public String getAppProtocol() { return appProtocol; } - public void setAppProtocol(String appProtocol) { this.appProtocol = appProtocol; } public V1ServicePort name(String name) { - this.name = name; return this; } @@ -115,14 +112,12 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } public V1ServicePort nodePort(Integer nodePort) { - this.nodePort = nodePort; return this; } @@ -136,14 +131,12 @@ public Integer getNodePort() { return nodePort; } - public void setNodePort(Integer nodePort) { this.nodePort = nodePort; } public V1ServicePort port(Integer port) { - this.port = port; return this; } @@ -157,14 +150,12 @@ public Integer getPort() { return port; } - public void setPort(Integer port) { this.port = port; } public V1ServicePort protocol(String protocol) { - this.protocol = protocol; return this; } @@ -178,14 +169,12 @@ public String getProtocol() { return protocol; } - public void setProtocol(String protocol) { this.protocol = protocol; } public V1ServicePort targetPort(IntOrString targetPort) { - this.targetPort = targetPort; return this; } @@ -199,7 +188,6 @@ public IntOrString getTargetPort() { return targetPort; } - public void setTargetPort(IntOrString targetPort) { this.targetPort = targetPort; } @@ -273,32 +261,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ServicePort + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ServicePort */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ServicePort.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ServicePort.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ServicePort is not found in the empty JSON string", V1ServicePort.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ServicePort.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ServicePort` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ServicePort` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1ServicePort.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("appProtocol") != null && !jsonObj.get("appProtocol").isJsonNull()) && !jsonObj.get("appProtocol").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `appProtocol` to be a primitive type in the JSON string but got `%s`", jsonObj.get("appProtocol").toString())); } @@ -333,9 +322,9 @@ public void write(JsonWriter out, V1ServicePort value) throws IOException { @Override public V1ServicePort read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -362,3 +351,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ServiceSpec.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ServiceSpec.java index 2d80d09176..cb6410359a 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ServiceSpec.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ServiceSpec.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1SessionAffinityConfig; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -47,7 +48,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -55,7 +55,7 @@ /** * ServiceSpec describes the attributes that a user creates on a service. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ServiceSpec { public static final String SERIALIZED_NAME_ALLOCATE_LOAD_BALANCER_NODE_PORTS = "allocateLoadBalancerNodePorts"; @SerializedName(SERIALIZED_NAME_ALLOCATE_LOAD_BALANCER_NODE_PORTS) @@ -67,11 +67,11 @@ public class V1ServiceSpec { public static final String SERIALIZED_NAME_CLUSTER_I_PS = "clusterIPs"; @SerializedName(SERIALIZED_NAME_CLUSTER_I_PS) - private List clusterIPs; + private List clusterIPs = new ArrayList<>(); public static final String SERIALIZED_NAME_EXTERNAL_I_PS = "externalIPs"; @SerializedName(SERIALIZED_NAME_EXTERNAL_I_PS) - private List externalIPs; + private List externalIPs = new ArrayList<>(); public static final String SERIALIZED_NAME_EXTERNAL_NAME = "externalName"; @SerializedName(SERIALIZED_NAME_EXTERNAL_NAME) @@ -91,7 +91,7 @@ public class V1ServiceSpec { public static final String SERIALIZED_NAME_IP_FAMILIES = "ipFamilies"; @SerializedName(SERIALIZED_NAME_IP_FAMILIES) - private List ipFamilies; + private List ipFamilies = new ArrayList<>(); public static final String SERIALIZED_NAME_IP_FAMILY_POLICY = "ipFamilyPolicy"; @SerializedName(SERIALIZED_NAME_IP_FAMILY_POLICY) @@ -107,11 +107,11 @@ public class V1ServiceSpec { public static final String SERIALIZED_NAME_LOAD_BALANCER_SOURCE_RANGES = "loadBalancerSourceRanges"; @SerializedName(SERIALIZED_NAME_LOAD_BALANCER_SOURCE_RANGES) - private List loadBalancerSourceRanges; + private List loadBalancerSourceRanges = new ArrayList<>(); public static final String SERIALIZED_NAME_PORTS = "ports"; @SerializedName(SERIALIZED_NAME_PORTS) - private List ports; + private List ports = new ArrayList<>(); public static final String SERIALIZED_NAME_PUBLISH_NOT_READY_ADDRESSES = "publishNotReadyAddresses"; @SerializedName(SERIALIZED_NAME_PUBLISH_NOT_READY_ADDRESSES) @@ -141,7 +141,6 @@ public V1ServiceSpec() { } public V1ServiceSpec allocateLoadBalancerNodePorts(Boolean allocateLoadBalancerNodePorts) { - this.allocateLoadBalancerNodePorts = allocateLoadBalancerNodePorts; return this; } @@ -155,14 +154,12 @@ public Boolean getAllocateLoadBalancerNodePorts() { return allocateLoadBalancerNodePorts; } - public void setAllocateLoadBalancerNodePorts(Boolean allocateLoadBalancerNodePorts) { this.allocateLoadBalancerNodePorts = allocateLoadBalancerNodePorts; } public V1ServiceSpec clusterIP(String clusterIP) { - this.clusterIP = clusterIP; return this; } @@ -176,14 +173,12 @@ public String getClusterIP() { return clusterIP; } - public void setClusterIP(String clusterIP) { this.clusterIP = clusterIP; } public V1ServiceSpec clusterIPs(List clusterIPs) { - this.clusterIPs = clusterIPs; return this; } @@ -205,14 +200,12 @@ public List getClusterIPs() { return clusterIPs; } - public void setClusterIPs(List clusterIPs) { this.clusterIPs = clusterIPs; } public V1ServiceSpec externalIPs(List externalIPs) { - this.externalIPs = externalIPs; return this; } @@ -234,14 +227,12 @@ public List getExternalIPs() { return externalIPs; } - public void setExternalIPs(List externalIPs) { this.externalIPs = externalIPs; } public V1ServiceSpec externalName(String externalName) { - this.externalName = externalName; return this; } @@ -255,14 +246,12 @@ public String getExternalName() { return externalName; } - public void setExternalName(String externalName) { this.externalName = externalName; } public V1ServiceSpec externalTrafficPolicy(String externalTrafficPolicy) { - this.externalTrafficPolicy = externalTrafficPolicy; return this; } @@ -276,14 +265,12 @@ public String getExternalTrafficPolicy() { return externalTrafficPolicy; } - public void setExternalTrafficPolicy(String externalTrafficPolicy) { this.externalTrafficPolicy = externalTrafficPolicy; } public V1ServiceSpec healthCheckNodePort(Integer healthCheckNodePort) { - this.healthCheckNodePort = healthCheckNodePort; return this; } @@ -297,14 +284,12 @@ public Integer getHealthCheckNodePort() { return healthCheckNodePort; } - public void setHealthCheckNodePort(Integer healthCheckNodePort) { this.healthCheckNodePort = healthCheckNodePort; } public V1ServiceSpec internalTrafficPolicy(String internalTrafficPolicy) { - this.internalTrafficPolicy = internalTrafficPolicy; return this; } @@ -318,14 +303,12 @@ public String getInternalTrafficPolicy() { return internalTrafficPolicy; } - public void setInternalTrafficPolicy(String internalTrafficPolicy) { this.internalTrafficPolicy = internalTrafficPolicy; } public V1ServiceSpec ipFamilies(List ipFamilies) { - this.ipFamilies = ipFamilies; return this; } @@ -347,14 +330,12 @@ public List getIpFamilies() { return ipFamilies; } - public void setIpFamilies(List ipFamilies) { this.ipFamilies = ipFamilies; } public V1ServiceSpec ipFamilyPolicy(String ipFamilyPolicy) { - this.ipFamilyPolicy = ipFamilyPolicy; return this; } @@ -368,14 +349,12 @@ public String getIpFamilyPolicy() { return ipFamilyPolicy; } - public void setIpFamilyPolicy(String ipFamilyPolicy) { this.ipFamilyPolicy = ipFamilyPolicy; } public V1ServiceSpec loadBalancerClass(String loadBalancerClass) { - this.loadBalancerClass = loadBalancerClass; return this; } @@ -389,14 +368,12 @@ public String getLoadBalancerClass() { return loadBalancerClass; } - public void setLoadBalancerClass(String loadBalancerClass) { this.loadBalancerClass = loadBalancerClass; } public V1ServiceSpec loadBalancerIP(String loadBalancerIP) { - this.loadBalancerIP = loadBalancerIP; return this; } @@ -410,14 +387,12 @@ public String getLoadBalancerIP() { return loadBalancerIP; } - public void setLoadBalancerIP(String loadBalancerIP) { this.loadBalancerIP = loadBalancerIP; } public V1ServiceSpec loadBalancerSourceRanges(List loadBalancerSourceRanges) { - this.loadBalancerSourceRanges = loadBalancerSourceRanges; return this; } @@ -439,14 +414,12 @@ public List getLoadBalancerSourceRanges() { return loadBalancerSourceRanges; } - public void setLoadBalancerSourceRanges(List loadBalancerSourceRanges) { this.loadBalancerSourceRanges = loadBalancerSourceRanges; } public V1ServiceSpec ports(List ports) { - this.ports = ports; return this; } @@ -468,14 +441,12 @@ public List getPorts() { return ports; } - public void setPorts(List ports) { this.ports = ports; } public V1ServiceSpec publishNotReadyAddresses(Boolean publishNotReadyAddresses) { - this.publishNotReadyAddresses = publishNotReadyAddresses; return this; } @@ -489,14 +460,12 @@ public Boolean getPublishNotReadyAddresses() { return publishNotReadyAddresses; } - public void setPublishNotReadyAddresses(Boolean publishNotReadyAddresses) { this.publishNotReadyAddresses = publishNotReadyAddresses; } public V1ServiceSpec selector(Map selector) { - this.selector = selector; return this; } @@ -518,14 +487,12 @@ public Map getSelector() { return selector; } - public void setSelector(Map selector) { this.selector = selector; } public V1ServiceSpec sessionAffinity(String sessionAffinity) { - this.sessionAffinity = sessionAffinity; return this; } @@ -539,14 +506,12 @@ public String getSessionAffinity() { return sessionAffinity; } - public void setSessionAffinity(String sessionAffinity) { this.sessionAffinity = sessionAffinity; } public V1ServiceSpec sessionAffinityConfig(V1SessionAffinityConfig sessionAffinityConfig) { - this.sessionAffinityConfig = sessionAffinityConfig; return this; } @@ -560,20 +525,18 @@ public V1SessionAffinityConfig getSessionAffinityConfig() { return sessionAffinityConfig; } - public void setSessionAffinityConfig(V1SessionAffinityConfig sessionAffinityConfig) { this.sessionAffinityConfig = sessionAffinityConfig; } public V1ServiceSpec trafficDistribution(String trafficDistribution) { - this.trafficDistribution = trafficDistribution; return this; } /** - * TrafficDistribution offers a way to express preferences for how traffic is distributed to Service endpoints. Implementations can use this field as a hint, but are not required to guarantee strict adherence. If the field is not set, the implementation will apply its default routing strategy. If set to \"PreferClose\", implementations should prioritize endpoints that are topologically close (e.g., same zone). + * TrafficDistribution offers a way to express preferences for how traffic is distributed to Service endpoints. Implementations can use this field as a hint, but are not required to guarantee strict adherence. If the field is not set, the implementation will apply its default routing strategy. If set to \"PreferClose\", implementations should prioritize endpoints that are topologically close (e.g., same zone). This is an alpha field and requires enabling ServiceTrafficDistribution feature. * @return trafficDistribution **/ @jakarta.annotation.Nullable @@ -581,14 +544,12 @@ public String getTrafficDistribution() { return trafficDistribution; } - public void setTrafficDistribution(String trafficDistribution) { this.trafficDistribution = trafficDistribution; } public V1ServiceSpec type(String type) { - this.type = type; return this; } @@ -602,7 +563,6 @@ public String getType() { return type; } - public void setType(String type) { this.type = type; } @@ -717,34 +677,35 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ServiceSpec + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ServiceSpec */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ServiceSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ServiceSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ServiceSpec is not found in the empty JSON string", V1ServiceSpec.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ServiceSpec.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ServiceSpec` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ServiceSpec` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("clusterIP") != null && !jsonObj.get("clusterIP").isJsonNull()) && !jsonObj.get("clusterIP").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `clusterIP` to be a primitive type in the JSON string but got `%s`", jsonObj.get("clusterIP").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("clusterIPs") != null && !jsonObj.get("clusterIPs").isJsonArray()) { + if (jsonObj.get("clusterIPs") != null && !jsonObj.get("clusterIPs").isJsonNull() && !jsonObj.get("clusterIPs").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `clusterIPs` to be an array in the JSON string but got `%s`", jsonObj.get("clusterIPs").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("externalIPs") != null && !jsonObj.get("externalIPs").isJsonArray()) { + if (jsonObj.get("externalIPs") != null && !jsonObj.get("externalIPs").isJsonNull() && !jsonObj.get("externalIPs").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `externalIPs` to be an array in the JSON string but got `%s`", jsonObj.get("externalIPs").toString())); } if ((jsonObj.get("externalName") != null && !jsonObj.get("externalName").isJsonNull()) && !jsonObj.get("externalName").isJsonPrimitive()) { @@ -757,7 +718,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("Expected the field `internalTrafficPolicy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("internalTrafficPolicy").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("ipFamilies") != null && !jsonObj.get("ipFamilies").isJsonArray()) { + if (jsonObj.get("ipFamilies") != null && !jsonObj.get("ipFamilies").isJsonNull() && !jsonObj.get("ipFamilies").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `ipFamilies` to be an array in the JSON string but got `%s`", jsonObj.get("ipFamilies").toString())); } if ((jsonObj.get("ipFamilyPolicy") != null && !jsonObj.get("ipFamilyPolicy").isJsonNull()) && !jsonObj.get("ipFamilyPolicy").isJsonPrimitive()) { @@ -770,7 +731,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("Expected the field `loadBalancerIP` to be a primitive type in the JSON string but got `%s`", jsonObj.get("loadBalancerIP").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("loadBalancerSourceRanges") != null && !jsonObj.get("loadBalancerSourceRanges").isJsonArray()) { + if (jsonObj.get("loadBalancerSourceRanges") != null && !jsonObj.get("loadBalancerSourceRanges").isJsonNull() && !jsonObj.get("loadBalancerSourceRanges").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `loadBalancerSourceRanges` to be an array in the JSON string but got `%s`", jsonObj.get("loadBalancerSourceRanges").toString())); } if (jsonObj.get("ports") != null && !jsonObj.get("ports").isJsonNull()) { @@ -783,7 +744,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `ports` (array) for (int i = 0; i < jsonArrayports.size(); i++) { - V1ServicePort.validateJsonObject(jsonArrayports.get(i).getAsJsonObject()); + V1ServicePort.validateJsonElement(jsonArrayports.get(i)); }; } } @@ -792,7 +753,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `sessionAffinityConfig` if (jsonObj.get("sessionAffinityConfig") != null && !jsonObj.get("sessionAffinityConfig").isJsonNull()) { - V1SessionAffinityConfig.validateJsonObject(jsonObj.getAsJsonObject("sessionAffinityConfig")); + V1SessionAffinityConfig.validateJsonElement(jsonObj.get("sessionAffinityConfig")); } if ((jsonObj.get("trafficDistribution") != null && !jsonObj.get("trafficDistribution").isJsonNull()) && !jsonObj.get("trafficDistribution").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `trafficDistribution` to be a primitive type in the JSON string but got `%s`", jsonObj.get("trafficDistribution").toString())); @@ -822,9 +783,9 @@ public void write(JsonWriter out, V1ServiceSpec value) throws IOException { @Override public V1ServiceSpec read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -851,3 +812,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ServiceStatus.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ServiceStatus.java index 4df562cbd0..b6086485b7 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ServiceStatus.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ServiceStatus.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1LoadBalancerStatus; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,11 +53,11 @@ /** * ServiceStatus represents the current status of a service. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ServiceStatus { public static final String SERIALIZED_NAME_CONDITIONS = "conditions"; @SerializedName(SERIALIZED_NAME_CONDITIONS) - private List conditions; + private List conditions = new ArrayList<>(); public static final String SERIALIZED_NAME_LOAD_BALANCER = "loadBalancer"; @SerializedName(SERIALIZED_NAME_LOAD_BALANCER) @@ -67,7 +67,6 @@ public V1ServiceStatus() { } public V1ServiceStatus conditions(List conditions) { - this.conditions = conditions; return this; } @@ -89,14 +88,12 @@ public List getConditions() { return conditions; } - public void setConditions(List conditions) { this.conditions = conditions; } public V1ServiceStatus loadBalancer(V1LoadBalancerStatus loadBalancer) { - this.loadBalancer = loadBalancer; return this; } @@ -110,7 +107,6 @@ public V1LoadBalancerStatus getLoadBalancer() { return loadBalancer; } - public void setLoadBalancer(V1LoadBalancerStatus loadBalancer) { this.loadBalancer = loadBalancer; } @@ -171,25 +167,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ServiceStatus + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ServiceStatus */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ServiceStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ServiceStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ServiceStatus is not found in the empty JSON string", V1ServiceStatus.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ServiceStatus.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ServiceStatus` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ServiceStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (jsonObj.get("conditions") != null && !jsonObj.get("conditions").isJsonNull()) { JsonArray jsonArrayconditions = jsonObj.getAsJsonArray("conditions"); if (jsonArrayconditions != null) { @@ -200,13 +197,13 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `conditions` (array) for (int i = 0; i < jsonArrayconditions.size(); i++) { - V1Condition.validateJsonObject(jsonArrayconditions.get(i).getAsJsonObject()); + V1Condition.validateJsonElement(jsonArrayconditions.get(i)); }; } } // validate the optional field `loadBalancer` if (jsonObj.get("loadBalancer") != null && !jsonObj.get("loadBalancer").isJsonNull()) { - V1LoadBalancerStatus.validateJsonObject(jsonObj.getAsJsonObject("loadBalancer")); + V1LoadBalancerStatus.validateJsonElement(jsonObj.get("loadBalancer")); } } @@ -230,9 +227,9 @@ public void write(JsonWriter out, V1ServiceStatus value) throws IOException { @Override public V1ServiceStatus read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -259,3 +256,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SessionAffinityConfig.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SessionAffinityConfig.java index 51f91ebb74..9c0f03f8af 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SessionAffinityConfig.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SessionAffinityConfig.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.openapi.models.V1ClientIPConfig; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * SessionAffinityConfig represents the configurations of session affinity. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1SessionAffinityConfig { public static final String SERIALIZED_NAME_CLIENT_I_P = "clientIP"; @SerializedName(SERIALIZED_NAME_CLIENT_I_P) @@ -60,7 +60,6 @@ public V1SessionAffinityConfig() { } public V1SessionAffinityConfig clientIP(V1ClientIPConfig clientIP) { - this.clientIP = clientIP; return this; } @@ -74,7 +73,6 @@ public V1ClientIPConfig getClientIP() { return clientIP; } - public void setClientIP(V1ClientIPConfig clientIP) { this.clientIP = clientIP; } @@ -132,28 +130,29 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1SessionAffinityConfig + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1SessionAffinityConfig */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1SessionAffinityConfig.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1SessionAffinityConfig.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1SessionAffinityConfig is not found in the empty JSON string", V1SessionAffinityConfig.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1SessionAffinityConfig.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1SessionAffinityConfig` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1SessionAffinityConfig` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `clientIP` if (jsonObj.get("clientIP") != null && !jsonObj.get("clientIP").isJsonNull()) { - V1ClientIPConfig.validateJsonObject(jsonObj.getAsJsonObject("clientIP")); + V1ClientIPConfig.validateJsonElement(jsonObj.get("clientIP")); } } @@ -177,9 +176,9 @@ public void write(JsonWriter out, V1SessionAffinityConfig value) throws IOExcept @Override public V1SessionAffinityConfig read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -206,3 +205,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SleepAction.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SleepAction.java index 457581fa6a..7db1636c67 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SleepAction.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SleepAction.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * SleepAction describes a \"sleep\" action. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1SleepAction { public static final String SERIALIZED_NAME_SECONDS = "seconds"; @SerializedName(SERIALIZED_NAME_SECONDS) @@ -59,7 +59,6 @@ public V1SleepAction() { } public V1SleepAction seconds(Long seconds) { - this.seconds = seconds; return this; } @@ -73,7 +72,6 @@ public Long getSeconds() { return seconds; } - public void setSeconds(Long seconds) { this.seconds = seconds; } @@ -132,32 +130,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1SleepAction + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1SleepAction */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1SleepAction.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1SleepAction.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1SleepAction is not found in the empty JSON string", V1SleepAction.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1SleepAction.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1SleepAction` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1SleepAction` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1SleepAction.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -180,9 +179,9 @@ public void write(JsonWriter out, V1SleepAction value) throws IOException { @Override public V1SleepAction read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -209,3 +208,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSet.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSet.java index 4c66f4b15c..6532431155 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSet.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSet.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1StatefulSetSpec; import io.kubernetes.client.openapi.models.V1StatefulSetStatus; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * 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. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1StatefulSet implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -78,7 +78,6 @@ public V1StatefulSet() { } public V1StatefulSet apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -92,14 +91,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1StatefulSet kind(String kind) { - this.kind = kind; return this; } @@ -113,14 +110,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1StatefulSet metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -134,14 +129,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V1StatefulSet spec(V1StatefulSetSpec spec) { - this.spec = spec; return this; } @@ -155,14 +148,12 @@ public V1StatefulSetSpec getSpec() { return spec; } - public void setSpec(V1StatefulSetSpec spec) { this.spec = spec; } public V1StatefulSet status(V1StatefulSetStatus status) { - this.status = status; return this; } @@ -176,7 +167,6 @@ public V1StatefulSetStatus getStatus() { return status; } - public void setStatus(V1StatefulSetStatus status) { this.status = status; } @@ -246,25 +236,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1StatefulSet + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1StatefulSet */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1StatefulSet.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1StatefulSet.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1StatefulSet is not found in the empty JSON string", V1StatefulSet.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1StatefulSet.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1StatefulSet` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1StatefulSet` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -273,15 +264,15 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } // validate the optional field `spec` if (jsonObj.get("spec") != null && !jsonObj.get("spec").isJsonNull()) { - V1StatefulSetSpec.validateJsonObject(jsonObj.getAsJsonObject("spec")); + V1StatefulSetSpec.validateJsonElement(jsonObj.get("spec")); } // validate the optional field `status` if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { - V1StatefulSetStatus.validateJsonObject(jsonObj.getAsJsonObject("status")); + V1StatefulSetStatus.validateJsonElement(jsonObj.get("status")); } } @@ -305,9 +296,9 @@ public void write(JsonWriter out, V1StatefulSet value) throws IOException { @Override public V1StatefulSet read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -334,3 +325,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetCondition.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetCondition.java index 5ba1022963..af56c838c3 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetCondition.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetCondition.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * StatefulSetCondition describes the state of a statefulset at a certain point. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1StatefulSetCondition { public static final String SERIALIZED_NAME_LAST_TRANSITION_TIME = "lastTransitionTime"; @SerializedName(SERIALIZED_NAME_LAST_TRANSITION_TIME) @@ -76,7 +76,6 @@ public V1StatefulSetCondition() { } public V1StatefulSetCondition lastTransitionTime(OffsetDateTime lastTransitionTime) { - this.lastTransitionTime = lastTransitionTime; return this; } @@ -90,14 +89,12 @@ public OffsetDateTime getLastTransitionTime() { return lastTransitionTime; } - public void setLastTransitionTime(OffsetDateTime lastTransitionTime) { this.lastTransitionTime = lastTransitionTime; } public V1StatefulSetCondition message(String message) { - this.message = message; return this; } @@ -111,14 +108,12 @@ public String getMessage() { return message; } - public void setMessage(String message) { this.message = message; } public V1StatefulSetCondition reason(String reason) { - this.reason = reason; return this; } @@ -132,14 +127,12 @@ public String getReason() { return reason; } - public void setReason(String reason) { this.reason = reason; } public V1StatefulSetCondition status(String status) { - this.status = status; return this; } @@ -153,14 +146,12 @@ public String getStatus() { return status; } - public void setStatus(String status) { this.status = status; } public V1StatefulSetCondition type(String type) { - this.type = type; return this; } @@ -174,7 +165,6 @@ public String getType() { return type; } - public void setType(String type) { this.type = type; } @@ -246,32 +236,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1StatefulSetCondition + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1StatefulSetCondition */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1StatefulSetCondition.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1StatefulSetCondition.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1StatefulSetCondition is not found in the empty JSON string", V1StatefulSetCondition.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1StatefulSetCondition.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1StatefulSetCondition` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1StatefulSetCondition` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1StatefulSetCondition.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); } @@ -306,9 +297,9 @@ public void write(JsonWriter out, V1StatefulSetCondition value) throws IOExcepti @Override public V1StatefulSetCondition read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -335,3 +326,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetList.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetList.java index 26752d7176..cf27d834a5 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetList.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetList.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1StatefulSet; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * StatefulSetList is a collection of StatefulSets. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1StatefulSetList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -75,7 +75,6 @@ public V1StatefulSetList() { } public V1StatefulSetList apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -89,14 +88,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1StatefulSetList items(List items) { - this.items = items; return this; } @@ -118,14 +115,12 @@ public List getItems() { return items; } - public void setItems(List items) { this.items = items; } public V1StatefulSetList kind(String kind) { - this.kind = kind; return this; } @@ -139,14 +134,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1StatefulSetList metadata(V1ListMeta metadata) { - this.metadata = metadata; return this; } @@ -160,7 +153,6 @@ public V1ListMeta getMetadata() { return metadata; } - public void setMetadata(V1ListMeta metadata) { this.metadata = metadata; } @@ -228,32 +220,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1StatefulSetList + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1StatefulSetList */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1StatefulSetList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1StatefulSetList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1StatefulSetList is not found in the empty JSON string", V1StatefulSetList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1StatefulSetList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1StatefulSetList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1StatefulSetList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1StatefulSetList.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -265,14 +258,14 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); // validate the required field `items` (array) for (int i = 0; i < jsonArrayitems.size(); i++) { - V1StatefulSet.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject()); + V1StatefulSet.validateJsonElement(jsonArrayitems.get(i)); }; if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ListMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ListMeta.validateJsonElement(jsonObj.get("metadata")); } } @@ -296,9 +289,9 @@ public void write(JsonWriter out, V1StatefulSetList value) throws IOException { @Override public V1StatefulSetList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -325,3 +318,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetOrdinals.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetOrdinals.java index e96a35814b..f0a9c5afe2 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetOrdinals.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetOrdinals.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * StatefulSetOrdinals describes the policy used for replica ordinal assignment in this StatefulSet. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1StatefulSetOrdinals { public static final String SERIALIZED_NAME_START = "start"; @SerializedName(SERIALIZED_NAME_START) @@ -59,7 +59,6 @@ public V1StatefulSetOrdinals() { } public V1StatefulSetOrdinals start(Integer start) { - this.start = start; return this; } @@ -73,7 +72,6 @@ public Integer getStart() { return start; } - public void setStart(Integer start) { this.start = start; } @@ -131,25 +129,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1StatefulSetOrdinals + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1StatefulSetOrdinals */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1StatefulSetOrdinals.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1StatefulSetOrdinals.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1StatefulSetOrdinals is not found in the empty JSON string", V1StatefulSetOrdinals.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1StatefulSetOrdinals.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1StatefulSetOrdinals` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1StatefulSetOrdinals` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -172,9 +171,9 @@ public void write(JsonWriter out, V1StatefulSetOrdinals value) throws IOExceptio @Override public V1StatefulSetOrdinals read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -201,3 +200,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetPersistentVolumeClaimRetentionPolicy.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetPersistentVolumeClaimRetentionPolicy.java index 1b0d38c850..8175eafde9 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetPersistentVolumeClaimRetentionPolicy.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetPersistentVolumeClaimRetentionPolicy.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * StatefulSetPersistentVolumeClaimRetentionPolicy describes the policy used for PVCs created from the StatefulSet VolumeClaimTemplates. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1StatefulSetPersistentVolumeClaimRetentionPolicy { public static final String SERIALIZED_NAME_WHEN_DELETED = "whenDeleted"; @SerializedName(SERIALIZED_NAME_WHEN_DELETED) @@ -63,7 +63,6 @@ public V1StatefulSetPersistentVolumeClaimRetentionPolicy() { } public V1StatefulSetPersistentVolumeClaimRetentionPolicy whenDeleted(String whenDeleted) { - this.whenDeleted = whenDeleted; return this; } @@ -77,14 +76,12 @@ public String getWhenDeleted() { return whenDeleted; } - public void setWhenDeleted(String whenDeleted) { this.whenDeleted = whenDeleted; } public V1StatefulSetPersistentVolumeClaimRetentionPolicy whenScaled(String whenScaled) { - this.whenScaled = whenScaled; return this; } @@ -98,7 +95,6 @@ public String getWhenScaled() { return whenScaled; } - public void setWhenScaled(String whenScaled) { this.whenScaled = whenScaled; } @@ -159,25 +155,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1StatefulSetPersistentVolumeClaimRetentionPolicy + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1StatefulSetPersistentVolumeClaimRetentionPolicy */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1StatefulSetPersistentVolumeClaimRetentionPolicy.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1StatefulSetPersistentVolumeClaimRetentionPolicy.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1StatefulSetPersistentVolumeClaimRetentionPolicy is not found in the empty JSON string", V1StatefulSetPersistentVolumeClaimRetentionPolicy.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1StatefulSetPersistentVolumeClaimRetentionPolicy.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1StatefulSetPersistentVolumeClaimRetentionPolicy` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1StatefulSetPersistentVolumeClaimRetentionPolicy` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("whenDeleted") != null && !jsonObj.get("whenDeleted").isJsonNull()) && !jsonObj.get("whenDeleted").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `whenDeleted` to be a primitive type in the JSON string but got `%s`", jsonObj.get("whenDeleted").toString())); } @@ -206,9 +203,9 @@ public void write(JsonWriter out, V1StatefulSetPersistentVolumeClaimRetentionPol @Override public V1StatefulSetPersistentVolumeClaimRetentionPolicy read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -235,3 +232,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetSpec.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetSpec.java index 8312ef2755..d359ec8121 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetSpec.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetSpec.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -27,6 +27,7 @@ import io.kubernetes.client.openapi.models.V1StatefulSetUpdateStrategy; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -49,7 +50,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -57,7 +57,7 @@ /** * A StatefulSetSpec is the specification of a StatefulSet. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1StatefulSetSpec { public static final String SERIALIZED_NAME_MIN_READY_SECONDS = "minReadySeconds"; @SerializedName(SERIALIZED_NAME_MIN_READY_SECONDS) @@ -101,13 +101,12 @@ public class V1StatefulSetSpec { public static final String SERIALIZED_NAME_VOLUME_CLAIM_TEMPLATES = "volumeClaimTemplates"; @SerializedName(SERIALIZED_NAME_VOLUME_CLAIM_TEMPLATES) - private List volumeClaimTemplates; + private List volumeClaimTemplates = new ArrayList<>(); public V1StatefulSetSpec() { } public V1StatefulSetSpec minReadySeconds(Integer minReadySeconds) { - this.minReadySeconds = minReadySeconds; return this; } @@ -121,14 +120,12 @@ public Integer getMinReadySeconds() { return minReadySeconds; } - public void setMinReadySeconds(Integer minReadySeconds) { this.minReadySeconds = minReadySeconds; } public V1StatefulSetSpec ordinals(V1StatefulSetOrdinals ordinals) { - this.ordinals = ordinals; return this; } @@ -142,14 +139,12 @@ public V1StatefulSetOrdinals getOrdinals() { return ordinals; } - public void setOrdinals(V1StatefulSetOrdinals ordinals) { this.ordinals = ordinals; } public V1StatefulSetSpec persistentVolumeClaimRetentionPolicy(V1StatefulSetPersistentVolumeClaimRetentionPolicy persistentVolumeClaimRetentionPolicy) { - this.persistentVolumeClaimRetentionPolicy = persistentVolumeClaimRetentionPolicy; return this; } @@ -163,14 +158,12 @@ public V1StatefulSetPersistentVolumeClaimRetentionPolicy getPersistentVolumeClai return persistentVolumeClaimRetentionPolicy; } - public void setPersistentVolumeClaimRetentionPolicy(V1StatefulSetPersistentVolumeClaimRetentionPolicy persistentVolumeClaimRetentionPolicy) { this.persistentVolumeClaimRetentionPolicy = persistentVolumeClaimRetentionPolicy; } public V1StatefulSetSpec podManagementPolicy(String podManagementPolicy) { - this.podManagementPolicy = podManagementPolicy; return this; } @@ -184,14 +177,12 @@ public String getPodManagementPolicy() { return podManagementPolicy; } - public void setPodManagementPolicy(String podManagementPolicy) { this.podManagementPolicy = podManagementPolicy; } public V1StatefulSetSpec replicas(Integer replicas) { - this.replicas = replicas; return this; } @@ -205,14 +196,12 @@ public Integer getReplicas() { return replicas; } - public void setReplicas(Integer replicas) { this.replicas = replicas; } public V1StatefulSetSpec revisionHistoryLimit(Integer revisionHistoryLimit) { - this.revisionHistoryLimit = revisionHistoryLimit; return this; } @@ -226,14 +215,12 @@ public Integer getRevisionHistoryLimit() { return revisionHistoryLimit; } - public void setRevisionHistoryLimit(Integer revisionHistoryLimit) { this.revisionHistoryLimit = revisionHistoryLimit; } public V1StatefulSetSpec selector(V1LabelSelector selector) { - this.selector = selector; return this; } @@ -247,14 +234,12 @@ public V1LabelSelector getSelector() { return selector; } - public void setSelector(V1LabelSelector selector) { this.selector = selector; } public V1StatefulSetSpec serviceName(String serviceName) { - this.serviceName = serviceName; return this; } @@ -268,14 +253,12 @@ public String getServiceName() { return serviceName; } - public void setServiceName(String serviceName) { this.serviceName = serviceName; } public V1StatefulSetSpec template(V1PodTemplateSpec template) { - this.template = template; return this; } @@ -289,14 +272,12 @@ public V1PodTemplateSpec getTemplate() { return template; } - public void setTemplate(V1PodTemplateSpec template) { this.template = template; } public V1StatefulSetSpec updateStrategy(V1StatefulSetUpdateStrategy updateStrategy) { - this.updateStrategy = updateStrategy; return this; } @@ -310,14 +291,12 @@ public V1StatefulSetUpdateStrategy getUpdateStrategy() { return updateStrategy; } - public void setUpdateStrategy(V1StatefulSetUpdateStrategy updateStrategy) { this.updateStrategy = updateStrategy; } public V1StatefulSetSpec volumeClaimTemplates(List volumeClaimTemplates) { - this.volumeClaimTemplates = volumeClaimTemplates; return this; } @@ -339,7 +318,6 @@ public List getVolumeClaimTemplates() { return volumeClaimTemplates; } - public void setVolumeClaimTemplates(List volumeClaimTemplates) { this.volumeClaimTemplates = volumeClaimTemplates; } @@ -430,53 +408,54 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1StatefulSetSpec + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1StatefulSetSpec */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1StatefulSetSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1StatefulSetSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1StatefulSetSpec is not found in the empty JSON string", V1StatefulSetSpec.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1StatefulSetSpec.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1StatefulSetSpec` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1StatefulSetSpec` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1StatefulSetSpec.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `ordinals` if (jsonObj.get("ordinals") != null && !jsonObj.get("ordinals").isJsonNull()) { - V1StatefulSetOrdinals.validateJsonObject(jsonObj.getAsJsonObject("ordinals")); + V1StatefulSetOrdinals.validateJsonElement(jsonObj.get("ordinals")); } // validate the optional field `persistentVolumeClaimRetentionPolicy` if (jsonObj.get("persistentVolumeClaimRetentionPolicy") != null && !jsonObj.get("persistentVolumeClaimRetentionPolicy").isJsonNull()) { - V1StatefulSetPersistentVolumeClaimRetentionPolicy.validateJsonObject(jsonObj.getAsJsonObject("persistentVolumeClaimRetentionPolicy")); + V1StatefulSetPersistentVolumeClaimRetentionPolicy.validateJsonElement(jsonObj.get("persistentVolumeClaimRetentionPolicy")); } if ((jsonObj.get("podManagementPolicy") != null && !jsonObj.get("podManagementPolicy").isJsonNull()) && !jsonObj.get("podManagementPolicy").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `podManagementPolicy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("podManagementPolicy").toString())); } // validate the required field `selector` - V1LabelSelector.validateJsonObject(jsonObj.getAsJsonObject("selector")); + V1LabelSelector.validateJsonElement(jsonObj.get("selector")); if (!jsonObj.get("serviceName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `serviceName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("serviceName").toString())); } // validate the required field `template` - V1PodTemplateSpec.validateJsonObject(jsonObj.getAsJsonObject("template")); + V1PodTemplateSpec.validateJsonElement(jsonObj.get("template")); // validate the optional field `updateStrategy` if (jsonObj.get("updateStrategy") != null && !jsonObj.get("updateStrategy").isJsonNull()) { - V1StatefulSetUpdateStrategy.validateJsonObject(jsonObj.getAsJsonObject("updateStrategy")); + V1StatefulSetUpdateStrategy.validateJsonElement(jsonObj.get("updateStrategy")); } if (jsonObj.get("volumeClaimTemplates") != null && !jsonObj.get("volumeClaimTemplates").isJsonNull()) { JsonArray jsonArrayvolumeClaimTemplates = jsonObj.getAsJsonArray("volumeClaimTemplates"); @@ -488,7 +467,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `volumeClaimTemplates` (array) for (int i = 0; i < jsonArrayvolumeClaimTemplates.size(); i++) { - V1PersistentVolumeClaim.validateJsonObject(jsonArrayvolumeClaimTemplates.get(i).getAsJsonObject()); + V1PersistentVolumeClaim.validateJsonElement(jsonArrayvolumeClaimTemplates.get(i)); }; } } @@ -514,9 +493,9 @@ public void write(JsonWriter out, V1StatefulSetSpec value) throws IOException { @Override public V1StatefulSetSpec read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -543,3 +522,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetStatus.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetStatus.java index 088bef42d5..cdea6de77a 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetStatus.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetStatus.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1StatefulSetCondition; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * StatefulSetStatus represents the current state of a StatefulSet. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1StatefulSetStatus { public static final String SERIALIZED_NAME_AVAILABLE_REPLICAS = "availableReplicas"; @SerializedName(SERIALIZED_NAME_AVAILABLE_REPLICAS) @@ -64,7 +64,7 @@ public class V1StatefulSetStatus { public static final String SERIALIZED_NAME_CONDITIONS = "conditions"; @SerializedName(SERIALIZED_NAME_CONDITIONS) - private List conditions; + private List conditions = new ArrayList<>(); public static final String SERIALIZED_NAME_CURRENT_REPLICAS = "currentReplicas"; @SerializedName(SERIALIZED_NAME_CURRENT_REPLICAS) @@ -98,7 +98,6 @@ public V1StatefulSetStatus() { } public V1StatefulSetStatus availableReplicas(Integer availableReplicas) { - this.availableReplicas = availableReplicas; return this; } @@ -112,14 +111,12 @@ public Integer getAvailableReplicas() { return availableReplicas; } - public void setAvailableReplicas(Integer availableReplicas) { this.availableReplicas = availableReplicas; } public V1StatefulSetStatus collisionCount(Integer collisionCount) { - this.collisionCount = collisionCount; return this; } @@ -133,14 +130,12 @@ public Integer getCollisionCount() { return collisionCount; } - public void setCollisionCount(Integer collisionCount) { this.collisionCount = collisionCount; } public V1StatefulSetStatus conditions(List conditions) { - this.conditions = conditions; return this; } @@ -162,14 +157,12 @@ public List getConditions() { return conditions; } - public void setConditions(List conditions) { this.conditions = conditions; } public V1StatefulSetStatus currentReplicas(Integer currentReplicas) { - this.currentReplicas = currentReplicas; return this; } @@ -183,14 +176,12 @@ public Integer getCurrentReplicas() { return currentReplicas; } - public void setCurrentReplicas(Integer currentReplicas) { this.currentReplicas = currentReplicas; } public V1StatefulSetStatus currentRevision(String currentRevision) { - this.currentRevision = currentRevision; return this; } @@ -204,14 +195,12 @@ public String getCurrentRevision() { return currentRevision; } - public void setCurrentRevision(String currentRevision) { this.currentRevision = currentRevision; } public V1StatefulSetStatus observedGeneration(Long observedGeneration) { - this.observedGeneration = observedGeneration; return this; } @@ -225,14 +214,12 @@ public Long getObservedGeneration() { return observedGeneration; } - public void setObservedGeneration(Long observedGeneration) { this.observedGeneration = observedGeneration; } public V1StatefulSetStatus readyReplicas(Integer readyReplicas) { - this.readyReplicas = readyReplicas; return this; } @@ -246,14 +233,12 @@ public Integer getReadyReplicas() { return readyReplicas; } - public void setReadyReplicas(Integer readyReplicas) { this.readyReplicas = readyReplicas; } public V1StatefulSetStatus replicas(Integer replicas) { - this.replicas = replicas; return this; } @@ -267,14 +252,12 @@ public Integer getReplicas() { return replicas; } - public void setReplicas(Integer replicas) { this.replicas = replicas; } public V1StatefulSetStatus updateRevision(String updateRevision) { - this.updateRevision = updateRevision; return this; } @@ -288,14 +271,12 @@ public String getUpdateRevision() { return updateRevision; } - public void setUpdateRevision(String updateRevision) { this.updateRevision = updateRevision; } public V1StatefulSetStatus updatedReplicas(Integer updatedReplicas) { - this.updatedReplicas = updatedReplicas; return this; } @@ -309,7 +290,6 @@ public Integer getUpdatedReplicas() { return updatedReplicas; } - public void setUpdatedReplicas(Integer updatedReplicas) { this.updatedReplicas = updatedReplicas; } @@ -395,32 +375,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1StatefulSetStatus + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1StatefulSetStatus */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1StatefulSetStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1StatefulSetStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1StatefulSetStatus is not found in the empty JSON string", V1StatefulSetStatus.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1StatefulSetStatus.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1StatefulSetStatus` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1StatefulSetStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1StatefulSetStatus.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (jsonObj.get("conditions") != null && !jsonObj.get("conditions").isJsonNull()) { JsonArray jsonArrayconditions = jsonObj.getAsJsonArray("conditions"); if (jsonArrayconditions != null) { @@ -431,7 +412,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `conditions` (array) for (int i = 0; i < jsonArrayconditions.size(); i++) { - V1StatefulSetCondition.validateJsonObject(jsonArrayconditions.get(i).getAsJsonObject()); + V1StatefulSetCondition.validateJsonElement(jsonArrayconditions.get(i)); }; } } @@ -463,9 +444,9 @@ public void write(JsonWriter out, V1StatefulSetStatus value) throws IOException @Override public V1StatefulSetStatus read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -492,3 +473,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetUpdateStrategy.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetUpdateStrategy.java index 96fa2be2c6..6a5f30dcc6 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetUpdateStrategy.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetUpdateStrategy.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.openapi.models.V1RollingUpdateStatefulSetStrategy; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * StatefulSetUpdateStrategy indicates the strategy that the StatefulSet controller will use to perform updates. It includes any additional parameters necessary to perform the update for the indicated strategy. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1StatefulSetUpdateStrategy { public static final String SERIALIZED_NAME_ROLLING_UPDATE = "rollingUpdate"; @SerializedName(SERIALIZED_NAME_ROLLING_UPDATE) @@ -64,7 +64,6 @@ public V1StatefulSetUpdateStrategy() { } public V1StatefulSetUpdateStrategy rollingUpdate(V1RollingUpdateStatefulSetStrategy rollingUpdate) { - this.rollingUpdate = rollingUpdate; return this; } @@ -78,14 +77,12 @@ public V1RollingUpdateStatefulSetStrategy getRollingUpdate() { return rollingUpdate; } - public void setRollingUpdate(V1RollingUpdateStatefulSetStrategy rollingUpdate) { this.rollingUpdate = rollingUpdate; } public V1StatefulSetUpdateStrategy type(String type) { - this.type = type; return this; } @@ -99,7 +96,6 @@ public String getType() { return type; } - public void setType(String type) { this.type = type; } @@ -160,28 +156,29 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1StatefulSetUpdateStrategy + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1StatefulSetUpdateStrategy */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1StatefulSetUpdateStrategy.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1StatefulSetUpdateStrategy.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1StatefulSetUpdateStrategy is not found in the empty JSON string", V1StatefulSetUpdateStrategy.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1StatefulSetUpdateStrategy.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1StatefulSetUpdateStrategy` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1StatefulSetUpdateStrategy` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `rollingUpdate` if (jsonObj.get("rollingUpdate") != null && !jsonObj.get("rollingUpdate").isJsonNull()) { - V1RollingUpdateStatefulSetStrategy.validateJsonObject(jsonObj.getAsJsonObject("rollingUpdate")); + V1RollingUpdateStatefulSetStrategy.validateJsonElement(jsonObj.get("rollingUpdate")); } if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); @@ -208,9 +205,9 @@ public void write(JsonWriter out, V1StatefulSetUpdateStrategy value) throws IOEx @Override public V1StatefulSetUpdateStrategy read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -237,3 +234,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Status.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Status.java index c830e3e72d..3e7bed4986 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Status.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Status.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1ListMeta; import io.kubernetes.client.openapi.models.V1StatusDetails; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -43,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -51,7 +51,7 @@ /** * Status is a return value for calls that don't return other objects. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1Status { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -89,7 +89,6 @@ public V1Status() { } public V1Status apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -103,14 +102,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1Status code(Integer code) { - this.code = code; return this; } @@ -124,14 +121,12 @@ public Integer getCode() { return code; } - public void setCode(Integer code) { this.code = code; } public V1Status details(V1StatusDetails details) { - this.details = details; return this; } @@ -145,14 +140,12 @@ public V1StatusDetails getDetails() { return details; } - public void setDetails(V1StatusDetails details) { this.details = details; } public V1Status kind(String kind) { - this.kind = kind; return this; } @@ -166,14 +159,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1Status message(String message) { - this.message = message; return this; } @@ -187,14 +178,12 @@ public String getMessage() { return message; } - public void setMessage(String message) { this.message = message; } public V1Status metadata(V1ListMeta metadata) { - this.metadata = metadata; return this; } @@ -208,14 +197,12 @@ public V1ListMeta getMetadata() { return metadata; } - public void setMetadata(V1ListMeta metadata) { this.metadata = metadata; } public V1Status reason(String reason) { - this.reason = reason; return this; } @@ -229,14 +216,12 @@ public String getReason() { return reason; } - public void setReason(String reason) { this.reason = reason; } public V1Status status(String status) { - this.status = status; return this; } @@ -250,7 +235,6 @@ public String getStatus() { return status; } - public void setStatus(String status) { this.status = status; } @@ -329,31 +313,32 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1Status + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1Status */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1Status.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1Status.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1Status is not found in the empty JSON string", V1Status.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1Status.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1Status` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1Status` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } // validate the optional field `details` if (jsonObj.get("details") != null && !jsonObj.get("details").isJsonNull()) { - V1StatusDetails.validateJsonObject(jsonObj.getAsJsonObject("details")); + V1StatusDetails.validateJsonElement(jsonObj.get("details")); } if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); @@ -363,7 +348,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ListMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ListMeta.validateJsonElement(jsonObj.get("metadata")); } if ((jsonObj.get("reason") != null && !jsonObj.get("reason").isJsonNull()) && !jsonObj.get("reason").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `reason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reason").toString())); @@ -393,10 +378,9 @@ public void write(JsonWriter out, V1Status value) throws IOException { @Override public V1Status read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - // Disable validation so delete API can tolerate non-status return object (graceful deletion) - // validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -423,3 +407,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1StatusCause.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1StatusCause.java index 068b7d8b37..ac759397f2 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1StatusCause.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1StatusCause.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * StatusCause provides more information about an api.Status failure, including cases when multiple errors are encountered. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1StatusCause { public static final String SERIALIZED_NAME_FIELD = "field"; @SerializedName(SERIALIZED_NAME_FIELD) @@ -67,7 +67,6 @@ public V1StatusCause() { } public V1StatusCause field(String field) { - this.field = field; return this; } @@ -81,14 +80,12 @@ public String getField() { return field; } - public void setField(String field) { this.field = field; } public V1StatusCause message(String message) { - this.message = message; return this; } @@ -102,14 +99,12 @@ public String getMessage() { return message; } - public void setMessage(String message) { this.message = message; } public V1StatusCause reason(String reason) { - this.reason = reason; return this; } @@ -123,7 +118,6 @@ public String getReason() { return reason; } - public void setReason(String reason) { this.reason = reason; } @@ -187,25 +181,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1StatusCause + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1StatusCause */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1StatusCause.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1StatusCause.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1StatusCause is not found in the empty JSON string", V1StatusCause.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1StatusCause.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1StatusCause` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1StatusCause` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("field") != null && !jsonObj.get("field").isJsonNull()) && !jsonObj.get("field").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `field` to be a primitive type in the JSON string but got `%s`", jsonObj.get("field").toString())); } @@ -237,9 +232,9 @@ public void write(JsonWriter out, V1StatusCause value) throws IOException { @Override public V1StatusCause read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -266,3 +261,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1StatusDetails.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1StatusDetails.java index b647cdfe4b..229458d0c8 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1StatusDetails.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1StatusDetails.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1StatusCause; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,11 +52,11 @@ /** * 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. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1StatusDetails { public static final String SERIALIZED_NAME_CAUSES = "causes"; @SerializedName(SERIALIZED_NAME_CAUSES) - private List causes; + private List causes = new ArrayList<>(); public static final String SERIALIZED_NAME_GROUP = "group"; @SerializedName(SERIALIZED_NAME_GROUP) @@ -82,7 +82,6 @@ public V1StatusDetails() { } public V1StatusDetails causes(List causes) { - this.causes = causes; return this; } @@ -104,14 +103,12 @@ public List getCauses() { return causes; } - public void setCauses(List causes) { this.causes = causes; } public V1StatusDetails group(String group) { - this.group = group; return this; } @@ -125,14 +122,12 @@ public String getGroup() { return group; } - public void setGroup(String group) { this.group = group; } public V1StatusDetails kind(String kind) { - this.kind = kind; return this; } @@ -146,14 +141,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1StatusDetails name(String name) { - this.name = name; return this; } @@ -167,14 +160,12 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } public V1StatusDetails retryAfterSeconds(Integer retryAfterSeconds) { - this.retryAfterSeconds = retryAfterSeconds; return this; } @@ -188,14 +179,12 @@ public Integer getRetryAfterSeconds() { return retryAfterSeconds; } - public void setRetryAfterSeconds(Integer retryAfterSeconds) { this.retryAfterSeconds = retryAfterSeconds; } public V1StatusDetails uid(String uid) { - this.uid = uid; return this; } @@ -209,7 +198,6 @@ public String getUid() { return uid; } - public void setUid(String uid) { this.uid = uid; } @@ -282,25 +270,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1StatusDetails + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1StatusDetails */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1StatusDetails.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1StatusDetails.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1StatusDetails is not found in the empty JSON string", V1StatusDetails.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1StatusDetails.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1StatusDetails` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1StatusDetails` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (jsonObj.get("causes") != null && !jsonObj.get("causes").isJsonNull()) { JsonArray jsonArraycauses = jsonObj.getAsJsonArray("causes"); if (jsonArraycauses != null) { @@ -311,7 +300,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `causes` (array) for (int i = 0; i < jsonArraycauses.size(); i++) { - V1StatusCause.validateJsonObject(jsonArraycauses.get(i).getAsJsonObject()); + V1StatusCause.validateJsonElement(jsonArraycauses.get(i)); }; } } @@ -349,9 +338,9 @@ public void write(JsonWriter out, V1StatusDetails value) throws IOException { @Override public V1StatusDetails read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -378,3 +367,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1StorageClass.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1StorageClass.java index b453013d13..1417618750 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1StorageClass.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1StorageClass.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1TopologySelectorTerm; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -47,7 +48,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -55,7 +55,7 @@ /** * 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. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1StorageClass implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_ALLOW_VOLUME_EXPANSION = "allowVolumeExpansion"; @SerializedName(SERIALIZED_NAME_ALLOW_VOLUME_EXPANSION) @@ -63,7 +63,7 @@ public class V1StorageClass implements io.kubernetes.client.common.KubernetesObj public static final String SERIALIZED_NAME_ALLOWED_TOPOLOGIES = "allowedTopologies"; @SerializedName(SERIALIZED_NAME_ALLOWED_TOPOLOGIES) - private List allowedTopologies; + private List allowedTopologies = new ArrayList<>(); public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -79,7 +79,7 @@ public class V1StorageClass implements io.kubernetes.client.common.KubernetesObj public static final String SERIALIZED_NAME_MOUNT_OPTIONS = "mountOptions"; @SerializedName(SERIALIZED_NAME_MOUNT_OPTIONS) - private List mountOptions; + private List mountOptions = new ArrayList<>(); public static final String SERIALIZED_NAME_PARAMETERS = "parameters"; @SerializedName(SERIALIZED_NAME_PARAMETERS) @@ -101,7 +101,6 @@ public V1StorageClass() { } public V1StorageClass allowVolumeExpansion(Boolean allowVolumeExpansion) { - this.allowVolumeExpansion = allowVolumeExpansion; return this; } @@ -115,14 +114,12 @@ public Boolean getAllowVolumeExpansion() { return allowVolumeExpansion; } - public void setAllowVolumeExpansion(Boolean allowVolumeExpansion) { this.allowVolumeExpansion = allowVolumeExpansion; } public V1StorageClass allowedTopologies(List allowedTopologies) { - this.allowedTopologies = allowedTopologies; return this; } @@ -144,14 +141,12 @@ public List getAllowedTopologies() { return allowedTopologies; } - public void setAllowedTopologies(List allowedTopologies) { this.allowedTopologies = allowedTopologies; } public V1StorageClass apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -165,14 +160,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1StorageClass kind(String kind) { - this.kind = kind; return this; } @@ -186,14 +179,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1StorageClass metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -207,14 +198,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V1StorageClass mountOptions(List mountOptions) { - this.mountOptions = mountOptions; return this; } @@ -236,14 +225,12 @@ public List getMountOptions() { return mountOptions; } - public void setMountOptions(List mountOptions) { this.mountOptions = mountOptions; } public V1StorageClass parameters(Map parameters) { - this.parameters = parameters; return this; } @@ -265,14 +252,12 @@ public Map getParameters() { return parameters; } - public void setParameters(Map parameters) { this.parameters = parameters; } public V1StorageClass provisioner(String provisioner) { - this.provisioner = provisioner; return this; } @@ -286,14 +271,12 @@ public String getProvisioner() { return provisioner; } - public void setProvisioner(String provisioner) { this.provisioner = provisioner; } public V1StorageClass reclaimPolicy(String reclaimPolicy) { - this.reclaimPolicy = reclaimPolicy; return this; } @@ -307,14 +290,12 @@ public String getReclaimPolicy() { return reclaimPolicy; } - public void setReclaimPolicy(String reclaimPolicy) { this.reclaimPolicy = reclaimPolicy; } public V1StorageClass volumeBindingMode(String volumeBindingMode) { - this.volumeBindingMode = volumeBindingMode; return this; } @@ -328,7 +309,6 @@ public String getVolumeBindingMode() { return volumeBindingMode; } - public void setVolumeBindingMode(String volumeBindingMode) { this.volumeBindingMode = volumeBindingMode; } @@ -414,32 +394,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1StorageClass + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1StorageClass */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1StorageClass.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1StorageClass.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1StorageClass is not found in the empty JSON string", V1StorageClass.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1StorageClass.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1StorageClass` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1StorageClass` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1StorageClass.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (jsonObj.get("allowedTopologies") != null && !jsonObj.get("allowedTopologies").isJsonNull()) { JsonArray jsonArrayallowedTopologies = jsonObj.getAsJsonArray("allowedTopologies"); if (jsonArrayallowedTopologies != null) { @@ -450,7 +431,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `allowedTopologies` (array) for (int i = 0; i < jsonArrayallowedTopologies.size(); i++) { - V1TopologySelectorTerm.validateJsonObject(jsonArrayallowedTopologies.get(i).getAsJsonObject()); + V1TopologySelectorTerm.validateJsonElement(jsonArrayallowedTopologies.get(i)); }; } } @@ -462,10 +443,10 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } // ensure the optional json data is an array if present - if (jsonObj.get("mountOptions") != null && !jsonObj.get("mountOptions").isJsonArray()) { + if (jsonObj.get("mountOptions") != null && !jsonObj.get("mountOptions").isJsonNull() && !jsonObj.get("mountOptions").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `mountOptions` to be an array in the JSON string but got `%s`", jsonObj.get("mountOptions").toString())); } if (!jsonObj.get("provisioner").isJsonPrimitive()) { @@ -499,9 +480,9 @@ public void write(JsonWriter out, V1StorageClass value) throws IOException { @Override public V1StorageClass read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -528,3 +509,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1StorageClassList.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1StorageClassList.java index 5526dfd31e..e06638ac26 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1StorageClassList.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1StorageClassList.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1StorageClass; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * StorageClassList is a collection of storage classes. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1StorageClassList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -75,7 +75,6 @@ public V1StorageClassList() { } public V1StorageClassList apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -89,14 +88,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1StorageClassList items(List items) { - this.items = items; return this; } @@ -118,14 +115,12 @@ public List getItems() { return items; } - public void setItems(List items) { this.items = items; } public V1StorageClassList kind(String kind) { - this.kind = kind; return this; } @@ -139,14 +134,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1StorageClassList metadata(V1ListMeta metadata) { - this.metadata = metadata; return this; } @@ -160,7 +153,6 @@ public V1ListMeta getMetadata() { return metadata; } - public void setMetadata(V1ListMeta metadata) { this.metadata = metadata; } @@ -228,32 +220,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1StorageClassList + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1StorageClassList */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1StorageClassList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1StorageClassList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1StorageClassList is not found in the empty JSON string", V1StorageClassList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1StorageClassList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1StorageClassList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1StorageClassList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1StorageClassList.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -265,14 +258,14 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); // validate the required field `items` (array) for (int i = 0; i < jsonArrayitems.size(); i++) { - V1StorageClass.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject()); + V1StorageClass.validateJsonElement(jsonArrayitems.get(i)); }; if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ListMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ListMeta.validateJsonElement(jsonObj.get("metadata")); } } @@ -296,9 +289,9 @@ public void write(JsonWriter out, V1StorageClassList value) throws IOException { @Override public V1StorageClassList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -325,3 +318,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1StorageOSPersistentVolumeSource.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1StorageOSPersistentVolumeSource.java index d0eb411418..bbd8960694 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1StorageOSPersistentVolumeSource.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1StorageOSPersistentVolumeSource.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.openapi.models.V1ObjectReference; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * Represents a StorageOS persistent volume resource. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1StorageOSPersistentVolumeSource { public static final String SERIALIZED_NAME_FS_TYPE = "fsType"; @SerializedName(SERIALIZED_NAME_FS_TYPE) @@ -76,7 +76,6 @@ public V1StorageOSPersistentVolumeSource() { } public V1StorageOSPersistentVolumeSource fsType(String fsType) { - this.fsType = fsType; return this; } @@ -90,14 +89,12 @@ public String getFsType() { return fsType; } - public void setFsType(String fsType) { this.fsType = fsType; } public V1StorageOSPersistentVolumeSource readOnly(Boolean readOnly) { - this.readOnly = readOnly; return this; } @@ -111,14 +108,12 @@ public Boolean getReadOnly() { return readOnly; } - public void setReadOnly(Boolean readOnly) { this.readOnly = readOnly; } public V1StorageOSPersistentVolumeSource secretRef(V1ObjectReference secretRef) { - this.secretRef = secretRef; return this; } @@ -132,14 +127,12 @@ public V1ObjectReference getSecretRef() { return secretRef; } - public void setSecretRef(V1ObjectReference secretRef) { this.secretRef = secretRef; } public V1StorageOSPersistentVolumeSource volumeName(String volumeName) { - this.volumeName = volumeName; return this; } @@ -153,14 +146,12 @@ public String getVolumeName() { return volumeName; } - public void setVolumeName(String volumeName) { this.volumeName = volumeName; } public V1StorageOSPersistentVolumeSource volumeNamespace(String volumeNamespace) { - this.volumeNamespace = volumeNamespace; return this; } @@ -174,7 +165,6 @@ public String getVolumeNamespace() { return volumeNamespace; } - public void setVolumeNamespace(String volumeNamespace) { this.volumeNamespace = volumeNamespace; } @@ -244,31 +234,32 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1StorageOSPersistentVolumeSource + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1StorageOSPersistentVolumeSource */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1StorageOSPersistentVolumeSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1StorageOSPersistentVolumeSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1StorageOSPersistentVolumeSource is not found in the empty JSON string", V1StorageOSPersistentVolumeSource.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1StorageOSPersistentVolumeSource.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1StorageOSPersistentVolumeSource` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1StorageOSPersistentVolumeSource` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("fsType") != null && !jsonObj.get("fsType").isJsonNull()) && !jsonObj.get("fsType").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `fsType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fsType").toString())); } // validate the optional field `secretRef` if (jsonObj.get("secretRef") != null && !jsonObj.get("secretRef").isJsonNull()) { - V1ObjectReference.validateJsonObject(jsonObj.getAsJsonObject("secretRef")); + V1ObjectReference.validateJsonElement(jsonObj.get("secretRef")); } if ((jsonObj.get("volumeName") != null && !jsonObj.get("volumeName").isJsonNull()) && !jsonObj.get("volumeName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `volumeName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("volumeName").toString())); @@ -298,9 +289,9 @@ public void write(JsonWriter out, V1StorageOSPersistentVolumeSource value) throw @Override public V1StorageOSPersistentVolumeSource read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -327,3 +318,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1StorageOSVolumeSource.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1StorageOSVolumeSource.java index 4638b5620e..d40381716e 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1StorageOSVolumeSource.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1StorageOSVolumeSource.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.openapi.models.V1LocalObjectReference; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * Represents a StorageOS persistent volume resource. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1StorageOSVolumeSource { public static final String SERIALIZED_NAME_FS_TYPE = "fsType"; @SerializedName(SERIALIZED_NAME_FS_TYPE) @@ -76,7 +76,6 @@ public V1StorageOSVolumeSource() { } public V1StorageOSVolumeSource fsType(String fsType) { - this.fsType = fsType; return this; } @@ -90,14 +89,12 @@ public String getFsType() { return fsType; } - public void setFsType(String fsType) { this.fsType = fsType; } public V1StorageOSVolumeSource readOnly(Boolean readOnly) { - this.readOnly = readOnly; return this; } @@ -111,14 +108,12 @@ public Boolean getReadOnly() { return readOnly; } - public void setReadOnly(Boolean readOnly) { this.readOnly = readOnly; } public V1StorageOSVolumeSource secretRef(V1LocalObjectReference secretRef) { - this.secretRef = secretRef; return this; } @@ -132,14 +127,12 @@ public V1LocalObjectReference getSecretRef() { return secretRef; } - public void setSecretRef(V1LocalObjectReference secretRef) { this.secretRef = secretRef; } public V1StorageOSVolumeSource volumeName(String volumeName) { - this.volumeName = volumeName; return this; } @@ -153,14 +146,12 @@ public String getVolumeName() { return volumeName; } - public void setVolumeName(String volumeName) { this.volumeName = volumeName; } public V1StorageOSVolumeSource volumeNamespace(String volumeNamespace) { - this.volumeNamespace = volumeNamespace; return this; } @@ -174,7 +165,6 @@ public String getVolumeNamespace() { return volumeNamespace; } - public void setVolumeNamespace(String volumeNamespace) { this.volumeNamespace = volumeNamespace; } @@ -244,31 +234,32 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1StorageOSVolumeSource + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1StorageOSVolumeSource */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1StorageOSVolumeSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1StorageOSVolumeSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1StorageOSVolumeSource is not found in the empty JSON string", V1StorageOSVolumeSource.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1StorageOSVolumeSource.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1StorageOSVolumeSource` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1StorageOSVolumeSource` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("fsType") != null && !jsonObj.get("fsType").isJsonNull()) && !jsonObj.get("fsType").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `fsType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fsType").toString())); } // validate the optional field `secretRef` if (jsonObj.get("secretRef") != null && !jsonObj.get("secretRef").isJsonNull()) { - V1LocalObjectReference.validateJsonObject(jsonObj.getAsJsonObject("secretRef")); + V1LocalObjectReference.validateJsonElement(jsonObj.get("secretRef")); } if ((jsonObj.get("volumeName") != null && !jsonObj.get("volumeName").isJsonNull()) && !jsonObj.get("volumeName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `volumeName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("volumeName").toString())); @@ -298,9 +289,9 @@ public void write(JsonWriter out, V1StorageOSVolumeSource value) throws IOExcept @Override public V1StorageOSVolumeSource read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -327,3 +318,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SubjectAccessReview.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SubjectAccessReview.java index 767895f7fc..92363cca78 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SubjectAccessReview.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SubjectAccessReview.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1SubjectAccessReviewSpec; import io.kubernetes.client.openapi.models.V1SubjectAccessReviewStatus; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * SubjectAccessReview checks whether or not a user or group can perform an action. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1SubjectAccessReview implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -78,7 +78,6 @@ public V1SubjectAccessReview() { } public V1SubjectAccessReview apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -92,14 +91,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1SubjectAccessReview kind(String kind) { - this.kind = kind; return this; } @@ -113,14 +110,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1SubjectAccessReview metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -134,14 +129,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V1SubjectAccessReview spec(V1SubjectAccessReviewSpec spec) { - this.spec = spec; return this; } @@ -155,14 +148,12 @@ public V1SubjectAccessReviewSpec getSpec() { return spec; } - public void setSpec(V1SubjectAccessReviewSpec spec) { this.spec = spec; } public V1SubjectAccessReview status(V1SubjectAccessReviewStatus status) { - this.status = status; return this; } @@ -176,7 +167,6 @@ public V1SubjectAccessReviewStatus getStatus() { return status; } - public void setStatus(V1SubjectAccessReviewStatus status) { this.status = status; } @@ -247,32 +237,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1SubjectAccessReview + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1SubjectAccessReview */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1SubjectAccessReview.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1SubjectAccessReview.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1SubjectAccessReview is not found in the empty JSON string", V1SubjectAccessReview.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1SubjectAccessReview.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1SubjectAccessReview` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1SubjectAccessReview` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1SubjectAccessReview.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -281,13 +272,13 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } // validate the required field `spec` - V1SubjectAccessReviewSpec.validateJsonObject(jsonObj.getAsJsonObject("spec")); + V1SubjectAccessReviewSpec.validateJsonElement(jsonObj.get("spec")); // validate the optional field `status` if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { - V1SubjectAccessReviewStatus.validateJsonObject(jsonObj.getAsJsonObject("status")); + V1SubjectAccessReviewStatus.validateJsonElement(jsonObj.get("status")); } } @@ -311,9 +302,9 @@ public void write(JsonWriter out, V1SubjectAccessReview value) throws IOExceptio @Override public V1SubjectAccessReview read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -340,3 +331,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SubjectAccessReviewSpec.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SubjectAccessReviewSpec.java index a9f2d9c8e7..04229aaf43 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SubjectAccessReviewSpec.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SubjectAccessReviewSpec.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1ResourceAttributes; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -47,7 +48,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -55,7 +55,7 @@ /** * SubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1SubjectAccessReviewSpec { public static final String SERIALIZED_NAME_EXTRA = "extra"; @SerializedName(SERIALIZED_NAME_EXTRA) @@ -63,7 +63,7 @@ public class V1SubjectAccessReviewSpec { public static final String SERIALIZED_NAME_GROUPS = "groups"; @SerializedName(SERIALIZED_NAME_GROUPS) - private List groups; + private List groups = new ArrayList<>(); public static final String SERIALIZED_NAME_NON_RESOURCE_ATTRIBUTES = "nonResourceAttributes"; @SerializedName(SERIALIZED_NAME_NON_RESOURCE_ATTRIBUTES) @@ -85,7 +85,6 @@ public V1SubjectAccessReviewSpec() { } public V1SubjectAccessReviewSpec extra(Map> extra) { - this.extra = extra; return this; } @@ -107,14 +106,12 @@ public Map> getExtra() { return extra; } - public void setExtra(Map> extra) { this.extra = extra; } public V1SubjectAccessReviewSpec groups(List groups) { - this.groups = groups; return this; } @@ -136,14 +133,12 @@ public List getGroups() { return groups; } - public void setGroups(List groups) { this.groups = groups; } public V1SubjectAccessReviewSpec nonResourceAttributes(V1NonResourceAttributes nonResourceAttributes) { - this.nonResourceAttributes = nonResourceAttributes; return this; } @@ -157,14 +152,12 @@ public V1NonResourceAttributes getNonResourceAttributes() { return nonResourceAttributes; } - public void setNonResourceAttributes(V1NonResourceAttributes nonResourceAttributes) { this.nonResourceAttributes = nonResourceAttributes; } public V1SubjectAccessReviewSpec resourceAttributes(V1ResourceAttributes resourceAttributes) { - this.resourceAttributes = resourceAttributes; return this; } @@ -178,14 +171,12 @@ public V1ResourceAttributes getResourceAttributes() { return resourceAttributes; } - public void setResourceAttributes(V1ResourceAttributes resourceAttributes) { this.resourceAttributes = resourceAttributes; } public V1SubjectAccessReviewSpec uid(String uid) { - this.uid = uid; return this; } @@ -199,14 +190,12 @@ public String getUid() { return uid; } - public void setUid(String uid) { this.uid = uid; } public V1SubjectAccessReviewSpec user(String user) { - this.user = user; return this; } @@ -220,7 +209,6 @@ public String getUser() { return user; } - public void setUser(String user) { this.user = user; } @@ -293,36 +281,37 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1SubjectAccessReviewSpec + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1SubjectAccessReviewSpec */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1SubjectAccessReviewSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1SubjectAccessReviewSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1SubjectAccessReviewSpec is not found in the empty JSON string", V1SubjectAccessReviewSpec.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1SubjectAccessReviewSpec.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1SubjectAccessReviewSpec` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1SubjectAccessReviewSpec` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the optional json data is an array if present - if (jsonObj.get("groups") != null && !jsonObj.get("groups").isJsonArray()) { + if (jsonObj.get("groups") != null && !jsonObj.get("groups").isJsonNull() && !jsonObj.get("groups").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `groups` to be an array in the JSON string but got `%s`", jsonObj.get("groups").toString())); } // validate the optional field `nonResourceAttributes` if (jsonObj.get("nonResourceAttributes") != null && !jsonObj.get("nonResourceAttributes").isJsonNull()) { - V1NonResourceAttributes.validateJsonObject(jsonObj.getAsJsonObject("nonResourceAttributes")); + V1NonResourceAttributes.validateJsonElement(jsonObj.get("nonResourceAttributes")); } // validate the optional field `resourceAttributes` if (jsonObj.get("resourceAttributes") != null && !jsonObj.get("resourceAttributes").isJsonNull()) { - V1ResourceAttributes.validateJsonObject(jsonObj.getAsJsonObject("resourceAttributes")); + V1ResourceAttributes.validateJsonElement(jsonObj.get("resourceAttributes")); } if ((jsonObj.get("uid") != null && !jsonObj.get("uid").isJsonNull()) && !jsonObj.get("uid").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `uid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uid").toString())); @@ -352,9 +341,9 @@ public void write(JsonWriter out, V1SubjectAccessReviewSpec value) throws IOExce @Override public V1SubjectAccessReviewSpec read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -381,3 +370,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SubjectAccessReviewStatus.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SubjectAccessReviewStatus.java index 3515f778f8..b1b7b75ced 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SubjectAccessReviewStatus.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SubjectAccessReviewStatus.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * SubjectAccessReviewStatus */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1SubjectAccessReviewStatus { public static final String SERIALIZED_NAME_ALLOWED = "allowed"; @SerializedName(SERIALIZED_NAME_ALLOWED) @@ -71,7 +71,6 @@ public V1SubjectAccessReviewStatus() { } public V1SubjectAccessReviewStatus allowed(Boolean allowed) { - this.allowed = allowed; return this; } @@ -85,14 +84,12 @@ public Boolean getAllowed() { return allowed; } - public void setAllowed(Boolean allowed) { this.allowed = allowed; } public V1SubjectAccessReviewStatus denied(Boolean denied) { - this.denied = denied; return this; } @@ -106,14 +103,12 @@ public Boolean getDenied() { return denied; } - public void setDenied(Boolean denied) { this.denied = denied; } public V1SubjectAccessReviewStatus evaluationError(String evaluationError) { - this.evaluationError = evaluationError; return this; } @@ -127,14 +122,12 @@ public String getEvaluationError() { return evaluationError; } - public void setEvaluationError(String evaluationError) { this.evaluationError = evaluationError; } public V1SubjectAccessReviewStatus reason(String reason) { - this.reason = reason; return this; } @@ -148,7 +141,6 @@ public String getReason() { return reason; } - public void setReason(String reason) { this.reason = reason; } @@ -216,32 +208,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1SubjectAccessReviewStatus + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1SubjectAccessReviewStatus */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1SubjectAccessReviewStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1SubjectAccessReviewStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1SubjectAccessReviewStatus is not found in the empty JSON string", V1SubjectAccessReviewStatus.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1SubjectAccessReviewStatus.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1SubjectAccessReviewStatus` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1SubjectAccessReviewStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1SubjectAccessReviewStatus.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("evaluationError") != null && !jsonObj.get("evaluationError").isJsonNull()) && !jsonObj.get("evaluationError").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `evaluationError` to be a primitive type in the JSON string but got `%s`", jsonObj.get("evaluationError").toString())); } @@ -270,9 +263,9 @@ public void write(JsonWriter out, V1SubjectAccessReviewStatus value) throws IOEx @Override public V1SubjectAccessReviewStatus read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -299,3 +292,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SubjectRulesReviewStatus.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SubjectRulesReviewStatus.java index af493023ba..6c308a5d61 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SubjectRulesReviewStatus.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SubjectRulesReviewStatus.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1ResourceRule; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * SubjectRulesReviewStatus contains the result of a rules check. This check can be incomplete depending on the set of authorizers the server is configured with and any errors experienced during evaluation. Because authorization rules are additive, if a rule appears in a list it's safe to assume the subject has that permission, even if that list is incomplete. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1SubjectRulesReviewStatus { public static final String SERIALIZED_NAME_EVALUATION_ERROR = "evaluationError"; @SerializedName(SERIALIZED_NAME_EVALUATION_ERROR) @@ -75,7 +75,6 @@ public V1SubjectRulesReviewStatus() { } public V1SubjectRulesReviewStatus evaluationError(String evaluationError) { - this.evaluationError = evaluationError; return this; } @@ -89,14 +88,12 @@ public String getEvaluationError() { return evaluationError; } - public void setEvaluationError(String evaluationError) { this.evaluationError = evaluationError; } public V1SubjectRulesReviewStatus incomplete(Boolean incomplete) { - this.incomplete = incomplete; return this; } @@ -110,14 +107,12 @@ public Boolean getIncomplete() { return incomplete; } - public void setIncomplete(Boolean incomplete) { this.incomplete = incomplete; } public V1SubjectRulesReviewStatus nonResourceRules(List nonResourceRules) { - this.nonResourceRules = nonResourceRules; return this; } @@ -139,14 +134,12 @@ public List getNonResourceRules() { return nonResourceRules; } - public void setNonResourceRules(List nonResourceRules) { this.nonResourceRules = nonResourceRules; } public V1SubjectRulesReviewStatus resourceRules(List resourceRules) { - this.resourceRules = resourceRules; return this; } @@ -168,7 +161,6 @@ public List getResourceRules() { return resourceRules; } - public void setResourceRules(List resourceRules) { this.resourceRules = resourceRules; } @@ -238,32 +230,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1SubjectRulesReviewStatus + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1SubjectRulesReviewStatus */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1SubjectRulesReviewStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1SubjectRulesReviewStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1SubjectRulesReviewStatus is not found in the empty JSON string", V1SubjectRulesReviewStatus.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1SubjectRulesReviewStatus.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1SubjectRulesReviewStatus` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1SubjectRulesReviewStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1SubjectRulesReviewStatus.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("evaluationError") != null && !jsonObj.get("evaluationError").isJsonNull()) && !jsonObj.get("evaluationError").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `evaluationError` to be a primitive type in the JSON string but got `%s`", jsonObj.get("evaluationError").toString())); } @@ -275,7 +268,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArraynonResourceRules = jsonObj.getAsJsonArray("nonResourceRules"); // validate the required field `nonResourceRules` (array) for (int i = 0; i < jsonArraynonResourceRules.size(); i++) { - V1NonResourceRule.validateJsonObject(jsonArraynonResourceRules.get(i).getAsJsonObject()); + V1NonResourceRule.validateJsonElement(jsonArraynonResourceRules.get(i)); }; // ensure the json data is an array if (!jsonObj.get("resourceRules").isJsonArray()) { @@ -285,7 +278,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArrayresourceRules = jsonObj.getAsJsonArray("resourceRules"); // validate the required field `resourceRules` (array) for (int i = 0; i < jsonArrayresourceRules.size(); i++) { - V1ResourceRule.validateJsonObject(jsonArrayresourceRules.get(i).getAsJsonObject()); + V1ResourceRule.validateJsonElement(jsonArrayresourceRules.get(i)); }; } @@ -309,9 +302,9 @@ public void write(JsonWriter out, V1SubjectRulesReviewStatus value) throws IOExc @Override public V1SubjectRulesReviewStatus read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -338,3 +331,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SuccessPolicy.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SuccessPolicy.java index aeef4c9d0c..395aa11b6f 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SuccessPolicy.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SuccessPolicy.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1SuccessPolicyRule; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * SuccessPolicy describes when a Job can be declared as succeeded based on the success of some indexes. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1SuccessPolicy { public static final String SERIALIZED_NAME_RULES = "rules"; @SerializedName(SERIALIZED_NAME_RULES) @@ -62,7 +62,6 @@ public V1SuccessPolicy() { } public V1SuccessPolicy rules(List rules) { - this.rules = rules; return this; } @@ -84,7 +83,6 @@ public List getRules() { return rules; } - public void setRules(List rules) { this.rules = rules; } @@ -143,32 +141,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1SuccessPolicy + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1SuccessPolicy */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1SuccessPolicy.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1SuccessPolicy.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1SuccessPolicy is not found in the empty JSON string", V1SuccessPolicy.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1SuccessPolicy.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1SuccessPolicy` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1SuccessPolicy` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1SuccessPolicy.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the json data is an array if (!jsonObj.get("rules").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `rules` to be an array in the JSON string but got `%s`", jsonObj.get("rules").toString())); @@ -177,7 +176,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArrayrules = jsonObj.getAsJsonArray("rules"); // validate the required field `rules` (array) for (int i = 0; i < jsonArrayrules.size(); i++) { - V1SuccessPolicyRule.validateJsonObject(jsonArrayrules.get(i).getAsJsonObject()); + V1SuccessPolicyRule.validateJsonElement(jsonArrayrules.get(i)); }; } @@ -201,9 +200,9 @@ public void write(JsonWriter out, V1SuccessPolicy value) throws IOException { @Override public V1SuccessPolicy read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -230,3 +229,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SuccessPolicyRule.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SuccessPolicyRule.java index 8ecade1593..5edf83ec4e 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SuccessPolicyRule.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SuccessPolicyRule.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * SuccessPolicyRule describes rule for declaring a Job as succeeded. Each rule must have at least one of the \"succeededIndexes\" or \"succeededCount\" specified. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1SuccessPolicyRule { public static final String SERIALIZED_NAME_SUCCEEDED_COUNT = "succeededCount"; @SerializedName(SERIALIZED_NAME_SUCCEEDED_COUNT) @@ -63,7 +63,6 @@ public V1SuccessPolicyRule() { } public V1SuccessPolicyRule succeededCount(Integer succeededCount) { - this.succeededCount = succeededCount; return this; } @@ -77,14 +76,12 @@ public Integer getSucceededCount() { return succeededCount; } - public void setSucceededCount(Integer succeededCount) { this.succeededCount = succeededCount; } public V1SuccessPolicyRule succeededIndexes(String succeededIndexes) { - this.succeededIndexes = succeededIndexes; return this; } @@ -98,7 +95,6 @@ public String getSucceededIndexes() { return succeededIndexes; } - public void setSucceededIndexes(String succeededIndexes) { this.succeededIndexes = succeededIndexes; } @@ -159,25 +155,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1SuccessPolicyRule + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1SuccessPolicyRule */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1SuccessPolicyRule.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1SuccessPolicyRule.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1SuccessPolicyRule is not found in the empty JSON string", V1SuccessPolicyRule.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1SuccessPolicyRule.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1SuccessPolicyRule` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1SuccessPolicyRule` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("succeededIndexes") != null && !jsonObj.get("succeededIndexes").isJsonNull()) && !jsonObj.get("succeededIndexes").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `succeededIndexes` to be a primitive type in the JSON string but got `%s`", jsonObj.get("succeededIndexes").toString())); } @@ -203,9 +200,9 @@ public void write(JsonWriter out, V1SuccessPolicyRule value) throws IOException @Override public V1SuccessPolicyRule read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -232,3 +229,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Sysctl.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Sysctl.java index 56c8d3dec8..e813411e09 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Sysctl.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Sysctl.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * Sysctl defines a kernel parameter to be set */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1Sysctl { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) @@ -63,7 +63,6 @@ public V1Sysctl() { } public V1Sysctl name(String name) { - this.name = name; return this; } @@ -77,14 +76,12 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } public V1Sysctl value(String value) { - this.value = value; return this; } @@ -98,7 +95,6 @@ public String getValue() { return value; } - public void setValue(String value) { this.value = value; } @@ -161,32 +157,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1Sysctl + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1Sysctl */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1Sysctl.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1Sysctl.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1Sysctl is not found in the empty JSON string", V1Sysctl.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1Sysctl.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1Sysctl` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1Sysctl` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1Sysctl.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } @@ -215,9 +212,9 @@ public void write(JsonWriter out, V1Sysctl value) throws IOException { @Override public V1Sysctl read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -244,3 +241,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1TCPSocketAction.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1TCPSocketAction.java index 94d3cde609..1b1fc80567 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1TCPSocketAction.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1TCPSocketAction.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.custom.IntOrString; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * TCPSocketAction describes an action based on opening a socket */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1TCPSocketAction { public static final String SERIALIZED_NAME_HOST = "host"; @SerializedName(SERIALIZED_NAME_HOST) @@ -64,7 +64,6 @@ public V1TCPSocketAction() { } public V1TCPSocketAction host(String host) { - this.host = host; return this; } @@ -78,14 +77,12 @@ public String getHost() { return host; } - public void setHost(String host) { this.host = host; } public V1TCPSocketAction port(IntOrString port) { - this.port = port; return this; } @@ -99,7 +96,6 @@ public IntOrString getPort() { return port; } - public void setPort(IntOrString port) { this.port = port; } @@ -161,32 +157,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1TCPSocketAction + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1TCPSocketAction */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1TCPSocketAction.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1TCPSocketAction.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1TCPSocketAction is not found in the empty JSON string", V1TCPSocketAction.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1TCPSocketAction.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1TCPSocketAction` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1TCPSocketAction` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1TCPSocketAction.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("host") != null && !jsonObj.get("host").isJsonNull()) && !jsonObj.get("host").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `host` to be a primitive type in the JSON string but got `%s`", jsonObj.get("host").toString())); } @@ -215,9 +212,9 @@ public void write(JsonWriter out, V1TCPSocketAction value) throws IOException { @Override public V1TCPSocketAction read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -244,3 +241,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Taint.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Taint.java index 22acdd1a96..576d275a36 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Taint.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Taint.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * The node this Taint is attached to has the \"effect\" on any pod that does not tolerate the Taint. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1Taint { public static final String SERIALIZED_NAME_EFFECT = "effect"; @SerializedName(SERIALIZED_NAME_EFFECT) @@ -72,7 +72,6 @@ public V1Taint() { } public V1Taint effect(String effect) { - this.effect = effect; return this; } @@ -86,14 +85,12 @@ public String getEffect() { return effect; } - public void setEffect(String effect) { this.effect = effect; } public V1Taint key(String key) { - this.key = key; return this; } @@ -107,14 +104,12 @@ public String getKey() { return key; } - public void setKey(String key) { this.key = key; } public V1Taint timeAdded(OffsetDateTime timeAdded) { - this.timeAdded = timeAdded; return this; } @@ -128,14 +123,12 @@ public OffsetDateTime getTimeAdded() { return timeAdded; } - public void setTimeAdded(OffsetDateTime timeAdded) { this.timeAdded = timeAdded; } public V1Taint value(String value) { - this.value = value; return this; } @@ -149,7 +142,6 @@ public String getValue() { return value; } - public void setValue(String value) { this.value = value; } @@ -218,32 +210,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1Taint + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1Taint */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1Taint.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1Taint.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1Taint is not found in the empty JSON string", V1Taint.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1Taint.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1Taint` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1Taint` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1Taint.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("effect").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `effect` to be a primitive type in the JSON string but got `%s`", jsonObj.get("effect").toString())); } @@ -275,9 +268,9 @@ public void write(JsonWriter out, V1Taint value) throws IOException { @Override public V1Taint read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -304,3 +297,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1TokenRequestSpec.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1TokenRequestSpec.java index b004b0e521..ed4c5b3abe 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1TokenRequestSpec.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1TokenRequestSpec.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1BoundObjectReference; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * TokenRequestSpec contains client provided parameters of a token request. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1TokenRequestSpec { public static final String SERIALIZED_NAME_AUDIENCES = "audiences"; @SerializedName(SERIALIZED_NAME_AUDIENCES) @@ -70,7 +70,6 @@ public V1TokenRequestSpec() { } public V1TokenRequestSpec audiences(List audiences) { - this.audiences = audiences; return this; } @@ -92,14 +91,12 @@ public List getAudiences() { return audiences; } - public void setAudiences(List audiences) { this.audiences = audiences; } public V1TokenRequestSpec boundObjectRef(V1BoundObjectReference boundObjectRef) { - this.boundObjectRef = boundObjectRef; return this; } @@ -113,14 +110,12 @@ public V1BoundObjectReference getBoundObjectRef() { return boundObjectRef; } - public void setBoundObjectRef(V1BoundObjectReference boundObjectRef) { this.boundObjectRef = boundObjectRef; } public V1TokenRequestSpec expirationSeconds(Long expirationSeconds) { - this.expirationSeconds = expirationSeconds; return this; } @@ -134,7 +129,6 @@ public Long getExpirationSeconds() { return expirationSeconds; } - public void setExpirationSeconds(Long expirationSeconds) { this.expirationSeconds = expirationSeconds; } @@ -199,32 +193,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1TokenRequestSpec + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1TokenRequestSpec */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1TokenRequestSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1TokenRequestSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1TokenRequestSpec is not found in the empty JSON string", V1TokenRequestSpec.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1TokenRequestSpec.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1TokenRequestSpec` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1TokenRequestSpec` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1TokenRequestSpec.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the required json array is present if (jsonObj.get("audiences") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); @@ -233,7 +228,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `boundObjectRef` if (jsonObj.get("boundObjectRef") != null && !jsonObj.get("boundObjectRef").isJsonNull()) { - V1BoundObjectReference.validateJsonObject(jsonObj.getAsJsonObject("boundObjectRef")); + V1BoundObjectReference.validateJsonElement(jsonObj.get("boundObjectRef")); } } @@ -257,9 +252,9 @@ public void write(JsonWriter out, V1TokenRequestSpec value) throws IOException { @Override public V1TokenRequestSpec read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -286,3 +281,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1TokenRequestStatus.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1TokenRequestStatus.java index 04c429bf15..8fa00c3d1d 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1TokenRequestStatus.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1TokenRequestStatus.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * TokenRequestStatus is the result of a token request. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1TokenRequestStatus { public static final String SERIALIZED_NAME_EXPIRATION_TIMESTAMP = "expirationTimestamp"; @SerializedName(SERIALIZED_NAME_EXPIRATION_TIMESTAMP) @@ -64,7 +64,6 @@ public V1TokenRequestStatus() { } public V1TokenRequestStatus expirationTimestamp(OffsetDateTime expirationTimestamp) { - this.expirationTimestamp = expirationTimestamp; return this; } @@ -78,14 +77,12 @@ public OffsetDateTime getExpirationTimestamp() { return expirationTimestamp; } - public void setExpirationTimestamp(OffsetDateTime expirationTimestamp) { this.expirationTimestamp = expirationTimestamp; } public V1TokenRequestStatus token(String token) { - this.token = token; return this; } @@ -99,7 +96,6 @@ public String getToken() { return token; } - public void setToken(String token) { this.token = token; } @@ -162,32 +158,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1TokenRequestStatus + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1TokenRequestStatus */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1TokenRequestStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1TokenRequestStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1TokenRequestStatus is not found in the empty JSON string", V1TokenRequestStatus.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1TokenRequestStatus.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1TokenRequestStatus` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1TokenRequestStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1TokenRequestStatus.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("token").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `token` to be a primitive type in the JSON string but got `%s`", jsonObj.get("token").toString())); } @@ -213,9 +210,9 @@ public void write(JsonWriter out, V1TokenRequestStatus value) throws IOException @Override public V1TokenRequestStatus read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -242,3 +239,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1TokenReview.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1TokenReview.java index d56c60ee74..38691c6a1c 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1TokenReview.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1TokenReview.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1TokenReviewSpec; import io.kubernetes.client.openapi.models.V1TokenReviewStatus; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * 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. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1TokenReview implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -78,7 +78,6 @@ public V1TokenReview() { } public V1TokenReview apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -92,14 +91,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1TokenReview kind(String kind) { - this.kind = kind; return this; } @@ -113,14 +110,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1TokenReview metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -134,14 +129,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V1TokenReview spec(V1TokenReviewSpec spec) { - this.spec = spec; return this; } @@ -155,14 +148,12 @@ public V1TokenReviewSpec getSpec() { return spec; } - public void setSpec(V1TokenReviewSpec spec) { this.spec = spec; } public V1TokenReview status(V1TokenReviewStatus status) { - this.status = status; return this; } @@ -176,7 +167,6 @@ public V1TokenReviewStatus getStatus() { return status; } - public void setStatus(V1TokenReviewStatus status) { this.status = status; } @@ -247,32 +237,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1TokenReview + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1TokenReview */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1TokenReview.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1TokenReview.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1TokenReview is not found in the empty JSON string", V1TokenReview.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1TokenReview.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1TokenReview` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1TokenReview` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1TokenReview.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -281,13 +272,13 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } // validate the required field `spec` - V1TokenReviewSpec.validateJsonObject(jsonObj.getAsJsonObject("spec")); + V1TokenReviewSpec.validateJsonElement(jsonObj.get("spec")); // validate the optional field `status` if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { - V1TokenReviewStatus.validateJsonObject(jsonObj.getAsJsonObject("status")); + V1TokenReviewStatus.validateJsonElement(jsonObj.get("status")); } } @@ -311,9 +302,9 @@ public void write(JsonWriter out, V1TokenReview value) throws IOException { @Override public V1TokenReview read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -340,3 +331,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1TokenReviewSpec.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1TokenReviewSpec.java index dd37da24e8..443dadf659 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1TokenReviewSpec.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1TokenReviewSpec.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -43,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -51,11 +51,11 @@ /** * TokenReviewSpec is a description of the token authentication request. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1TokenReviewSpec { public static final String SERIALIZED_NAME_AUDIENCES = "audiences"; @SerializedName(SERIALIZED_NAME_AUDIENCES) - private List audiences; + private List audiences = new ArrayList<>(); public static final String SERIALIZED_NAME_TOKEN = "token"; @SerializedName(SERIALIZED_NAME_TOKEN) @@ -65,7 +65,6 @@ public V1TokenReviewSpec() { } public V1TokenReviewSpec audiences(List audiences) { - this.audiences = audiences; return this; } @@ -87,14 +86,12 @@ public List getAudiences() { return audiences; } - public void setAudiences(List audiences) { this.audiences = audiences; } public V1TokenReviewSpec token(String token) { - this.token = token; return this; } @@ -108,7 +105,6 @@ public String getToken() { return token; } - public void setToken(String token) { this.token = token; } @@ -169,27 +165,28 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1TokenReviewSpec + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1TokenReviewSpec */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1TokenReviewSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1TokenReviewSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1TokenReviewSpec is not found in the empty JSON string", V1TokenReviewSpec.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1TokenReviewSpec.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1TokenReviewSpec` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1TokenReviewSpec` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the optional json data is an array if present - if (jsonObj.get("audiences") != null && !jsonObj.get("audiences").isJsonArray()) { + if (jsonObj.get("audiences") != null && !jsonObj.get("audiences").isJsonNull() && !jsonObj.get("audiences").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `audiences` to be an array in the JSON string but got `%s`", jsonObj.get("audiences").toString())); } if ((jsonObj.get("token") != null && !jsonObj.get("token").isJsonNull()) && !jsonObj.get("token").isJsonPrimitive()) { @@ -217,9 +214,9 @@ public void write(JsonWriter out, V1TokenReviewSpec value) throws IOException { @Override public V1TokenReviewSpec read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -246,3 +243,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1TokenReviewStatus.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1TokenReviewStatus.java index a657c4e311..48c816e889 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1TokenReviewStatus.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1TokenReviewStatus.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1UserInfo; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,11 +52,11 @@ /** * TokenReviewStatus is the result of the token authentication request. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1TokenReviewStatus { public static final String SERIALIZED_NAME_AUDIENCES = "audiences"; @SerializedName(SERIALIZED_NAME_AUDIENCES) - private List audiences; + private List audiences = new ArrayList<>(); public static final String SERIALIZED_NAME_AUTHENTICATED = "authenticated"; @SerializedName(SERIALIZED_NAME_AUTHENTICATED) @@ -74,7 +74,6 @@ public V1TokenReviewStatus() { } public V1TokenReviewStatus audiences(List audiences) { - this.audiences = audiences; return this; } @@ -96,14 +95,12 @@ public List getAudiences() { return audiences; } - public void setAudiences(List audiences) { this.audiences = audiences; } public V1TokenReviewStatus authenticated(Boolean authenticated) { - this.authenticated = authenticated; return this; } @@ -117,14 +114,12 @@ public Boolean getAuthenticated() { return authenticated; } - public void setAuthenticated(Boolean authenticated) { this.authenticated = authenticated; } public V1TokenReviewStatus error(String error) { - this.error = error; return this; } @@ -138,14 +133,12 @@ public String getError() { return error; } - public void setError(String error) { this.error = error; } public V1TokenReviewStatus user(V1UserInfo user) { - this.user = user; return this; } @@ -159,7 +152,6 @@ public V1UserInfo getUser() { return user; } - public void setUser(V1UserInfo user) { this.user = user; } @@ -226,27 +218,28 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1TokenReviewStatus + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1TokenReviewStatus */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1TokenReviewStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1TokenReviewStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1TokenReviewStatus is not found in the empty JSON string", V1TokenReviewStatus.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1TokenReviewStatus.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1TokenReviewStatus` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1TokenReviewStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the optional json data is an array if present - if (jsonObj.get("audiences") != null && !jsonObj.get("audiences").isJsonArray()) { + if (jsonObj.get("audiences") != null && !jsonObj.get("audiences").isJsonNull() && !jsonObj.get("audiences").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `audiences` to be an array in the JSON string but got `%s`", jsonObj.get("audiences").toString())); } if ((jsonObj.get("error") != null && !jsonObj.get("error").isJsonNull()) && !jsonObj.get("error").isJsonPrimitive()) { @@ -254,7 +247,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `user` if (jsonObj.get("user") != null && !jsonObj.get("user").isJsonNull()) { - V1UserInfo.validateJsonObject(jsonObj.getAsJsonObject("user")); + V1UserInfo.validateJsonElement(jsonObj.get("user")); } } @@ -278,9 +271,9 @@ public void write(JsonWriter out, V1TokenReviewStatus value) throws IOException @Override public V1TokenReviewStatus read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -307,3 +300,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Toleration.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Toleration.java index bc6a05d600..828382d0eb 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Toleration.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Toleration.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * The pod this Toleration is attached to tolerates any taint that matches the triple <key,value,effect> using the matching operator <operator>. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1Toleration { public static final String SERIALIZED_NAME_EFFECT = "effect"; @SerializedName(SERIALIZED_NAME_EFFECT) @@ -75,7 +75,6 @@ public V1Toleration() { } public V1Toleration effect(String effect) { - this.effect = effect; return this; } @@ -89,14 +88,12 @@ public String getEffect() { return effect; } - public void setEffect(String effect) { this.effect = effect; } public V1Toleration key(String key) { - this.key = key; return this; } @@ -110,14 +107,12 @@ public String getKey() { return key; } - public void setKey(String key) { this.key = key; } public V1Toleration operator(String operator) { - this.operator = operator; return this; } @@ -131,14 +126,12 @@ public String getOperator() { return operator; } - public void setOperator(String operator) { this.operator = operator; } public V1Toleration tolerationSeconds(Long tolerationSeconds) { - this.tolerationSeconds = tolerationSeconds; return this; } @@ -152,14 +145,12 @@ public Long getTolerationSeconds() { return tolerationSeconds; } - public void setTolerationSeconds(Long tolerationSeconds) { this.tolerationSeconds = tolerationSeconds; } public V1Toleration value(String value) { - this.value = value; return this; } @@ -173,7 +164,6 @@ public String getValue() { return value; } - public void setValue(String value) { this.value = value; } @@ -243,25 +233,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1Toleration + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1Toleration */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1Toleration.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1Toleration.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1Toleration is not found in the empty JSON string", V1Toleration.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1Toleration.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1Toleration` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1Toleration` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("effect") != null && !jsonObj.get("effect").isJsonNull()) && !jsonObj.get("effect").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `effect` to be a primitive type in the JSON string but got `%s`", jsonObj.get("effect").toString())); } @@ -296,9 +287,9 @@ public void write(JsonWriter out, V1Toleration value) throws IOException { @Override public V1Toleration read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -325,3 +316,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1TopologySelectorLabelRequirement.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1TopologySelectorLabelRequirement.java index 041fca9331..5cdfbb3cf9 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1TopologySelectorLabelRequirement.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1TopologySelectorLabelRequirement.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -43,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -51,7 +51,7 @@ /** * A topology selector requirement is a selector that matches given label. This is an alpha feature and may change in the future. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1TopologySelectorLabelRequirement { public static final String SERIALIZED_NAME_KEY = "key"; @SerializedName(SERIALIZED_NAME_KEY) @@ -65,7 +65,6 @@ public V1TopologySelectorLabelRequirement() { } public V1TopologySelectorLabelRequirement key(String key) { - this.key = key; return this; } @@ -79,14 +78,12 @@ public String getKey() { return key; } - public void setKey(String key) { this.key = key; } public V1TopologySelectorLabelRequirement values(List values) { - this.values = values; return this; } @@ -108,7 +105,6 @@ public List getValues() { return values; } - public void setValues(List values) { this.values = values; } @@ -171,32 +167,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1TopologySelectorLabelRequirement + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1TopologySelectorLabelRequirement */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1TopologySelectorLabelRequirement.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1TopologySelectorLabelRequirement.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1TopologySelectorLabelRequirement is not found in the empty JSON string", V1TopologySelectorLabelRequirement.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1TopologySelectorLabelRequirement.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1TopologySelectorLabelRequirement` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1TopologySelectorLabelRequirement` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1TopologySelectorLabelRequirement.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("key").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `key` to be a primitive type in the JSON string but got `%s`", jsonObj.get("key").toString())); } @@ -228,9 +225,9 @@ public void write(JsonWriter out, V1TopologySelectorLabelRequirement value) thro @Override public V1TopologySelectorLabelRequirement read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -257,3 +254,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1TopologySelectorTerm.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1TopologySelectorTerm.java index cb81feea4b..65c5ba23bf 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1TopologySelectorTerm.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1TopologySelectorTerm.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1TopologySelectorLabelRequirement; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,17 +52,16 @@ /** * A topology selector term represents the result of label queries. A null or empty topology selector term matches no objects. The requirements of them are ANDed. It provides a subset of functionality as NodeSelectorTerm. This is an alpha feature and may change in the future. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1TopologySelectorTerm { public static final String SERIALIZED_NAME_MATCH_LABEL_EXPRESSIONS = "matchLabelExpressions"; @SerializedName(SERIALIZED_NAME_MATCH_LABEL_EXPRESSIONS) - private List matchLabelExpressions; + private List matchLabelExpressions = new ArrayList<>(); public V1TopologySelectorTerm() { } public V1TopologySelectorTerm matchLabelExpressions(List matchLabelExpressions) { - this.matchLabelExpressions = matchLabelExpressions; return this; } @@ -84,7 +83,6 @@ public List getMatchLabelExpressions() { return matchLabelExpressions; } - public void setMatchLabelExpressions(List matchLabelExpressions) { this.matchLabelExpressions = matchLabelExpressions; } @@ -142,25 +140,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1TopologySelectorTerm + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1TopologySelectorTerm */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1TopologySelectorTerm.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1TopologySelectorTerm.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1TopologySelectorTerm is not found in the empty JSON string", V1TopologySelectorTerm.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1TopologySelectorTerm.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1TopologySelectorTerm` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1TopologySelectorTerm` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (jsonObj.get("matchLabelExpressions") != null && !jsonObj.get("matchLabelExpressions").isJsonNull()) { JsonArray jsonArraymatchLabelExpressions = jsonObj.getAsJsonArray("matchLabelExpressions"); if (jsonArraymatchLabelExpressions != null) { @@ -171,7 +170,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `matchLabelExpressions` (array) for (int i = 0; i < jsonArraymatchLabelExpressions.size(); i++) { - V1TopologySelectorLabelRequirement.validateJsonObject(jsonArraymatchLabelExpressions.get(i).getAsJsonObject()); + V1TopologySelectorLabelRequirement.validateJsonElement(jsonArraymatchLabelExpressions.get(i)); }; } } @@ -197,9 +196,9 @@ public void write(JsonWriter out, V1TopologySelectorTerm value) throws IOExcepti @Override public V1TopologySelectorTerm read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -226,3 +225,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1TopologySpreadConstraint.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1TopologySpreadConstraint.java index 2754bc1b0d..d8a10d1a8b 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1TopologySpreadConstraint.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1TopologySpreadConstraint.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1LabelSelector; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * TopologySpreadConstraint specifies how to spread matching pods among the given topology. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1TopologySpreadConstraint { public static final String SERIALIZED_NAME_LABEL_SELECTOR = "labelSelector"; @SerializedName(SERIALIZED_NAME_LABEL_SELECTOR) @@ -60,7 +60,7 @@ public class V1TopologySpreadConstraint { public static final String SERIALIZED_NAME_MATCH_LABEL_KEYS = "matchLabelKeys"; @SerializedName(SERIALIZED_NAME_MATCH_LABEL_KEYS) - private List matchLabelKeys; + private List matchLabelKeys = new ArrayList<>(); public static final String SERIALIZED_NAME_MAX_SKEW = "maxSkew"; @SerializedName(SERIALIZED_NAME_MAX_SKEW) @@ -90,7 +90,6 @@ public V1TopologySpreadConstraint() { } public V1TopologySpreadConstraint labelSelector(V1LabelSelector labelSelector) { - this.labelSelector = labelSelector; return this; } @@ -104,14 +103,12 @@ public V1LabelSelector getLabelSelector() { return labelSelector; } - public void setLabelSelector(V1LabelSelector labelSelector) { this.labelSelector = labelSelector; } public V1TopologySpreadConstraint matchLabelKeys(List matchLabelKeys) { - this.matchLabelKeys = matchLabelKeys; return this; } @@ -133,14 +130,12 @@ public List getMatchLabelKeys() { return matchLabelKeys; } - public void setMatchLabelKeys(List matchLabelKeys) { this.matchLabelKeys = matchLabelKeys; } public V1TopologySpreadConstraint maxSkew(Integer maxSkew) { - this.maxSkew = maxSkew; return this; } @@ -154,14 +149,12 @@ public Integer getMaxSkew() { return maxSkew; } - public void setMaxSkew(Integer maxSkew) { this.maxSkew = maxSkew; } public V1TopologySpreadConstraint minDomains(Integer minDomains) { - this.minDomains = minDomains; return this; } @@ -175,14 +168,12 @@ public Integer getMinDomains() { return minDomains; } - public void setMinDomains(Integer minDomains) { this.minDomains = minDomains; } public V1TopologySpreadConstraint nodeAffinityPolicy(String nodeAffinityPolicy) { - this.nodeAffinityPolicy = nodeAffinityPolicy; return this; } @@ -196,14 +187,12 @@ public String getNodeAffinityPolicy() { return nodeAffinityPolicy; } - public void setNodeAffinityPolicy(String nodeAffinityPolicy) { this.nodeAffinityPolicy = nodeAffinityPolicy; } public V1TopologySpreadConstraint nodeTaintsPolicy(String nodeTaintsPolicy) { - this.nodeTaintsPolicy = nodeTaintsPolicy; return this; } @@ -217,14 +206,12 @@ public String getNodeTaintsPolicy() { return nodeTaintsPolicy; } - public void setNodeTaintsPolicy(String nodeTaintsPolicy) { this.nodeTaintsPolicy = nodeTaintsPolicy; } public V1TopologySpreadConstraint topologyKey(String topologyKey) { - this.topologyKey = topologyKey; return this; } @@ -238,14 +225,12 @@ public String getTopologyKey() { return topologyKey; } - public void setTopologyKey(String topologyKey) { this.topologyKey = topologyKey; } public V1TopologySpreadConstraint whenUnsatisfiable(String whenUnsatisfiable) { - this.whenUnsatisfiable = whenUnsatisfiable; return this; } @@ -259,7 +244,6 @@ public String getWhenUnsatisfiable() { return whenUnsatisfiable; } - public void setWhenUnsatisfiable(String whenUnsatisfiable) { this.whenUnsatisfiable = whenUnsatisfiable; } @@ -341,38 +325,39 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1TopologySpreadConstraint + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1TopologySpreadConstraint */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1TopologySpreadConstraint.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1TopologySpreadConstraint.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1TopologySpreadConstraint is not found in the empty JSON string", V1TopologySpreadConstraint.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1TopologySpreadConstraint.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1TopologySpreadConstraint` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1TopologySpreadConstraint` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1TopologySpreadConstraint.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `labelSelector` if (jsonObj.get("labelSelector") != null && !jsonObj.get("labelSelector").isJsonNull()) { - V1LabelSelector.validateJsonObject(jsonObj.getAsJsonObject("labelSelector")); + V1LabelSelector.validateJsonElement(jsonObj.get("labelSelector")); } // ensure the optional json data is an array if present - if (jsonObj.get("matchLabelKeys") != null && !jsonObj.get("matchLabelKeys").isJsonArray()) { + if (jsonObj.get("matchLabelKeys") != null && !jsonObj.get("matchLabelKeys").isJsonNull() && !jsonObj.get("matchLabelKeys").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `matchLabelKeys` to be an array in the JSON string but got `%s`", jsonObj.get("matchLabelKeys").toString())); } if ((jsonObj.get("nodeAffinityPolicy") != null && !jsonObj.get("nodeAffinityPolicy").isJsonNull()) && !jsonObj.get("nodeAffinityPolicy").isJsonPrimitive()) { @@ -409,9 +394,9 @@ public void write(JsonWriter out, V1TopologySpreadConstraint value) throws IOExc @Override public V1TopologySpreadConstraint read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -438,3 +423,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1TypeChecking.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1TypeChecking.java index 54c2c2d089..da9733372a 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1TypeChecking.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1TypeChecking.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1ExpressionWarning; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,17 +52,16 @@ /** * TypeChecking contains results of type checking the expressions in the ValidatingAdmissionPolicy */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1TypeChecking { public static final String SERIALIZED_NAME_EXPRESSION_WARNINGS = "expressionWarnings"; @SerializedName(SERIALIZED_NAME_EXPRESSION_WARNINGS) - private List expressionWarnings; + private List expressionWarnings = new ArrayList<>(); public V1TypeChecking() { } public V1TypeChecking expressionWarnings(List expressionWarnings) { - this.expressionWarnings = expressionWarnings; return this; } @@ -84,7 +83,6 @@ public List getExpressionWarnings() { return expressionWarnings; } - public void setExpressionWarnings(List expressionWarnings) { this.expressionWarnings = expressionWarnings; } @@ -142,25 +140,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1TypeChecking + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1TypeChecking */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1TypeChecking.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1TypeChecking.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1TypeChecking is not found in the empty JSON string", V1TypeChecking.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1TypeChecking.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1TypeChecking` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1TypeChecking` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (jsonObj.get("expressionWarnings") != null && !jsonObj.get("expressionWarnings").isJsonNull()) { JsonArray jsonArrayexpressionWarnings = jsonObj.getAsJsonArray("expressionWarnings"); if (jsonArrayexpressionWarnings != null) { @@ -171,7 +170,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `expressionWarnings` (array) for (int i = 0; i < jsonArrayexpressionWarnings.size(); i++) { - V1ExpressionWarning.validateJsonObject(jsonArrayexpressionWarnings.get(i).getAsJsonObject()); + V1ExpressionWarning.validateJsonElement(jsonArrayexpressionWarnings.get(i)); }; } } @@ -197,9 +196,9 @@ public void write(JsonWriter out, V1TypeChecking value) throws IOException { @Override public V1TypeChecking read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -226,3 +225,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1TypedLocalObjectReference.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1TypedLocalObjectReference.java index ab81b93c9c..1201d204b8 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1TypedLocalObjectReference.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1TypedLocalObjectReference.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * TypedLocalObjectReference contains enough information to let you locate the typed referenced object inside the same namespace. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1TypedLocalObjectReference { public static final String SERIALIZED_NAME_API_GROUP = "apiGroup"; @SerializedName(SERIALIZED_NAME_API_GROUP) @@ -67,7 +67,6 @@ public V1TypedLocalObjectReference() { } public V1TypedLocalObjectReference apiGroup(String apiGroup) { - this.apiGroup = apiGroup; return this; } @@ -81,14 +80,12 @@ public String getApiGroup() { return apiGroup; } - public void setApiGroup(String apiGroup) { this.apiGroup = apiGroup; } public V1TypedLocalObjectReference kind(String kind) { - this.kind = kind; return this; } @@ -102,14 +99,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1TypedLocalObjectReference name(String name) { - this.name = name; return this; } @@ -123,7 +118,6 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } @@ -189,32 +183,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1TypedLocalObjectReference + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1TypedLocalObjectReference */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1TypedLocalObjectReference.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1TypedLocalObjectReference.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1TypedLocalObjectReference is not found in the empty JSON string", V1TypedLocalObjectReference.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1TypedLocalObjectReference.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1TypedLocalObjectReference` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1TypedLocalObjectReference` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1TypedLocalObjectReference.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiGroup") != null && !jsonObj.get("apiGroup").isJsonNull()) && !jsonObj.get("apiGroup").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiGroup` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiGroup").toString())); } @@ -246,9 +241,9 @@ public void write(JsonWriter out, V1TypedLocalObjectReference value) throws IOEx @Override public V1TypedLocalObjectReference read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -275,3 +270,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1TypedObjectReference.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1TypedObjectReference.java index 880f6aef65..07656fe39e 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1TypedObjectReference.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1TypedObjectReference.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * V1TypedObjectReference */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1TypedObjectReference { public static final String SERIALIZED_NAME_API_GROUP = "apiGroup"; @SerializedName(SERIALIZED_NAME_API_GROUP) @@ -71,7 +71,6 @@ public V1TypedObjectReference() { } public V1TypedObjectReference apiGroup(String apiGroup) { - this.apiGroup = apiGroup; return this; } @@ -85,14 +84,12 @@ public String getApiGroup() { return apiGroup; } - public void setApiGroup(String apiGroup) { this.apiGroup = apiGroup; } public V1TypedObjectReference kind(String kind) { - this.kind = kind; return this; } @@ -106,14 +103,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1TypedObjectReference name(String name) { - this.name = name; return this; } @@ -127,14 +122,12 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } public V1TypedObjectReference namespace(String namespace) { - this.namespace = namespace; return this; } @@ -148,7 +141,6 @@ public String getNamespace() { return namespace; } - public void setNamespace(String namespace) { this.namespace = namespace; } @@ -217,32 +209,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1TypedObjectReference + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1TypedObjectReference */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1TypedObjectReference.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1TypedObjectReference.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1TypedObjectReference is not found in the empty JSON string", V1TypedObjectReference.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1TypedObjectReference.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1TypedObjectReference` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1TypedObjectReference` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1TypedObjectReference.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiGroup") != null && !jsonObj.get("apiGroup").isJsonNull()) && !jsonObj.get("apiGroup").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiGroup` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiGroup").toString())); } @@ -277,9 +270,9 @@ public void write(JsonWriter out, V1TypedObjectReference value) throws IOExcepti @Override public V1TypedObjectReference read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -306,3 +299,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1UncountedTerminatedPods.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1UncountedTerminatedPods.java index 55a1cff114..38a48f9efd 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1UncountedTerminatedPods.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1UncountedTerminatedPods.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -43,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -51,21 +51,20 @@ /** * UncountedTerminatedPods holds UIDs of Pods that have terminated but haven't been accounted in Job status counters. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1UncountedTerminatedPods { public static final String SERIALIZED_NAME_FAILED = "failed"; @SerializedName(SERIALIZED_NAME_FAILED) - private List failed; + private List failed = new ArrayList<>(); public static final String SERIALIZED_NAME_SUCCEEDED = "succeeded"; @SerializedName(SERIALIZED_NAME_SUCCEEDED) - private List succeeded; + private List succeeded = new ArrayList<>(); public V1UncountedTerminatedPods() { } public V1UncountedTerminatedPods failed(List failed) { - this.failed = failed; return this; } @@ -87,14 +86,12 @@ public List getFailed() { return failed; } - public void setFailed(List failed) { this.failed = failed; } public V1UncountedTerminatedPods succeeded(List succeeded) { - this.succeeded = succeeded; return this; } @@ -116,7 +113,6 @@ public List getSucceeded() { return succeeded; } - public void setSucceeded(List succeeded) { this.succeeded = succeeded; } @@ -177,31 +173,32 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1UncountedTerminatedPods + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1UncountedTerminatedPods */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1UncountedTerminatedPods.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1UncountedTerminatedPods.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1UncountedTerminatedPods is not found in the empty JSON string", V1UncountedTerminatedPods.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1UncountedTerminatedPods.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1UncountedTerminatedPods` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1UncountedTerminatedPods` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the optional json data is an array if present - if (jsonObj.get("failed") != null && !jsonObj.get("failed").isJsonArray()) { + if (jsonObj.get("failed") != null && !jsonObj.get("failed").isJsonNull() && !jsonObj.get("failed").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `failed` to be an array in the JSON string but got `%s`", jsonObj.get("failed").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("succeeded") != null && !jsonObj.get("succeeded").isJsonArray()) { + if (jsonObj.get("succeeded") != null && !jsonObj.get("succeeded").isJsonNull() && !jsonObj.get("succeeded").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `succeeded` to be an array in the JSON string but got `%s`", jsonObj.get("succeeded").toString())); } } @@ -226,9 +223,9 @@ public void write(JsonWriter out, V1UncountedTerminatedPods value) throws IOExce @Override public V1UncountedTerminatedPods read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -255,3 +252,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1UserInfo.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1UserInfo.java index 3d336602e3..c0e75da016 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1UserInfo.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1UserInfo.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * UserInfo holds the information about the user needed to implement the user.Info interface. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1UserInfo { public static final String SERIALIZED_NAME_EXTRA = "extra"; @SerializedName(SERIALIZED_NAME_EXTRA) @@ -61,7 +61,7 @@ public class V1UserInfo { public static final String SERIALIZED_NAME_GROUPS = "groups"; @SerializedName(SERIALIZED_NAME_GROUPS) - private List groups; + private List groups = new ArrayList<>(); public static final String SERIALIZED_NAME_UID = "uid"; @SerializedName(SERIALIZED_NAME_UID) @@ -75,7 +75,6 @@ public V1UserInfo() { } public V1UserInfo extra(Map> extra) { - this.extra = extra; return this; } @@ -97,14 +96,12 @@ public Map> getExtra() { return extra; } - public void setExtra(Map> extra) { this.extra = extra; } public V1UserInfo groups(List groups) { - this.groups = groups; return this; } @@ -126,14 +123,12 @@ public List getGroups() { return groups; } - public void setGroups(List groups) { this.groups = groups; } public V1UserInfo uid(String uid) { - this.uid = uid; return this; } @@ -147,14 +142,12 @@ public String getUid() { return uid; } - public void setUid(String uid) { this.uid = uid; } public V1UserInfo username(String username) { - this.username = username; return this; } @@ -168,7 +161,6 @@ public String getUsername() { return username; } - public void setUsername(String username) { this.username = username; } @@ -235,27 +227,28 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1UserInfo + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1UserInfo */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1UserInfo.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1UserInfo.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1UserInfo is not found in the empty JSON string", V1UserInfo.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1UserInfo.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1UserInfo` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1UserInfo` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the optional json data is an array if present - if (jsonObj.get("groups") != null && !jsonObj.get("groups").isJsonArray()) { + if (jsonObj.get("groups") != null && !jsonObj.get("groups").isJsonNull() && !jsonObj.get("groups").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `groups` to be an array in the JSON string but got `%s`", jsonObj.get("groups").toString())); } if ((jsonObj.get("uid") != null && !jsonObj.get("uid").isJsonNull()) && !jsonObj.get("uid").isJsonPrimitive()) { @@ -286,9 +279,9 @@ public void write(JsonWriter out, V1UserInfo value) throws IOException { @Override public V1UserInfo read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -315,3 +308,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1UserSubject.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1UserSubject.java index 7710866495..28a937b491 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1UserSubject.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1UserSubject.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * UserSubject holds detailed information for user-kind subject. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1UserSubject { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) @@ -59,7 +59,6 @@ public V1UserSubject() { } public V1UserSubject name(String name) { - this.name = name; return this; } @@ -73,7 +72,6 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } @@ -132,32 +130,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1UserSubject + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1UserSubject */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1UserSubject.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1UserSubject.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1UserSubject is not found in the empty JSON string", V1UserSubject.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1UserSubject.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1UserSubject` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1UserSubject` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1UserSubject.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } @@ -183,9 +182,9 @@ public void write(JsonWriter out, V1UserSubject value) throws IOException { @Override public V1UserSubject read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -212,3 +211,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ValidatingAdmissionPolicy.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ValidatingAdmissionPolicy.java index 78b85fdb60..01904b326b 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ValidatingAdmissionPolicy.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ValidatingAdmissionPolicy.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1ValidatingAdmissionPolicySpec; import io.kubernetes.client.openapi.models.V1ValidatingAdmissionPolicyStatus; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * ValidatingAdmissionPolicy describes the definition of an admission validation policy that accepts or rejects an object without changing it. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ValidatingAdmissionPolicy implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -78,7 +78,6 @@ public V1ValidatingAdmissionPolicy() { } public V1ValidatingAdmissionPolicy apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -92,14 +91,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1ValidatingAdmissionPolicy kind(String kind) { - this.kind = kind; return this; } @@ -113,14 +110,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1ValidatingAdmissionPolicy metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -134,14 +129,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V1ValidatingAdmissionPolicy spec(V1ValidatingAdmissionPolicySpec spec) { - this.spec = spec; return this; } @@ -155,14 +148,12 @@ public V1ValidatingAdmissionPolicySpec getSpec() { return spec; } - public void setSpec(V1ValidatingAdmissionPolicySpec spec) { this.spec = spec; } public V1ValidatingAdmissionPolicy status(V1ValidatingAdmissionPolicyStatus status) { - this.status = status; return this; } @@ -176,7 +167,6 @@ public V1ValidatingAdmissionPolicyStatus getStatus() { return status; } - public void setStatus(V1ValidatingAdmissionPolicyStatus status) { this.status = status; } @@ -246,25 +236,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ValidatingAdmissionPolicy + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ValidatingAdmissionPolicy */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ValidatingAdmissionPolicy.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ValidatingAdmissionPolicy.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ValidatingAdmissionPolicy is not found in the empty JSON string", V1ValidatingAdmissionPolicy.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ValidatingAdmissionPolicy.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ValidatingAdmissionPolicy` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ValidatingAdmissionPolicy` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -273,15 +264,15 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } // validate the optional field `spec` if (jsonObj.get("spec") != null && !jsonObj.get("spec").isJsonNull()) { - V1ValidatingAdmissionPolicySpec.validateJsonObject(jsonObj.getAsJsonObject("spec")); + V1ValidatingAdmissionPolicySpec.validateJsonElement(jsonObj.get("spec")); } // validate the optional field `status` if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { - V1ValidatingAdmissionPolicyStatus.validateJsonObject(jsonObj.getAsJsonObject("status")); + V1ValidatingAdmissionPolicyStatus.validateJsonElement(jsonObj.get("status")); } } @@ -305,9 +296,9 @@ public void write(JsonWriter out, V1ValidatingAdmissionPolicy value) throws IOEx @Override public V1ValidatingAdmissionPolicy read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -334,3 +325,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ValidatingAdmissionPolicyBinding.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ValidatingAdmissionPolicyBinding.java index a296e05c4b..f69bf65f95 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ValidatingAdmissionPolicyBinding.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ValidatingAdmissionPolicyBinding.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1ObjectMeta; import io.kubernetes.client.openapi.models.V1ValidatingAdmissionPolicyBindingSpec; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -43,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -51,7 +51,7 @@ /** * ValidatingAdmissionPolicyBinding binds the ValidatingAdmissionPolicy with paramerized resources. ValidatingAdmissionPolicyBinding and parameter CRDs together define how cluster administrators configure policies for clusters. For a given admission request, each binding will cause its policy to be evaluated N times, where N is 1 for policies/bindings that don't use params, otherwise N is the number of parameters selected by the binding. The CEL expressions of a policy must have a computed CEL cost below the maximum CEL budget. Each evaluation of the policy is given an independent CEL cost budget. Adding/removing policies, bindings, or params can not affect whether a given (policy, binding, param) combination is within its own CEL budget. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ValidatingAdmissionPolicyBinding implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -73,7 +73,6 @@ public V1ValidatingAdmissionPolicyBinding() { } public V1ValidatingAdmissionPolicyBinding apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -87,14 +86,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1ValidatingAdmissionPolicyBinding kind(String kind) { - this.kind = kind; return this; } @@ -108,14 +105,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1ValidatingAdmissionPolicyBinding metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -129,14 +124,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V1ValidatingAdmissionPolicyBinding spec(V1ValidatingAdmissionPolicyBindingSpec spec) { - this.spec = spec; return this; } @@ -150,7 +143,6 @@ public V1ValidatingAdmissionPolicyBindingSpec getSpec() { return spec; } - public void setSpec(V1ValidatingAdmissionPolicyBindingSpec spec) { this.spec = spec; } @@ -217,25 +209,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ValidatingAdmissionPolicyBinding + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ValidatingAdmissionPolicyBinding */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ValidatingAdmissionPolicyBinding.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ValidatingAdmissionPolicyBinding.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ValidatingAdmissionPolicyBinding is not found in the empty JSON string", V1ValidatingAdmissionPolicyBinding.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ValidatingAdmissionPolicyBinding.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ValidatingAdmissionPolicyBinding` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ValidatingAdmissionPolicyBinding` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -244,11 +237,11 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } // validate the optional field `spec` if (jsonObj.get("spec") != null && !jsonObj.get("spec").isJsonNull()) { - V1ValidatingAdmissionPolicyBindingSpec.validateJsonObject(jsonObj.getAsJsonObject("spec")); + V1ValidatingAdmissionPolicyBindingSpec.validateJsonElement(jsonObj.get("spec")); } } @@ -272,9 +265,9 @@ public void write(JsonWriter out, V1ValidatingAdmissionPolicyBinding value) thro @Override public V1ValidatingAdmissionPolicyBinding read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -301,3 +294,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ValidatingAdmissionPolicyBindingList.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ValidatingAdmissionPolicyBindingList.java index 018173caf6..22d10cc904 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ValidatingAdmissionPolicyBindingList.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ValidatingAdmissionPolicyBindingList.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1ValidatingAdmissionPolicyBinding; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * ValidatingAdmissionPolicyBindingList is a list of ValidatingAdmissionPolicyBinding. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ValidatingAdmissionPolicyBindingList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -61,7 +61,7 @@ public class V1ValidatingAdmissionPolicyBindingList implements io.kubernetes.cli public static final String SERIALIZED_NAME_ITEMS = "items"; @SerializedName(SERIALIZED_NAME_ITEMS) - private List items; + private List items = new ArrayList<>(); public static final String SERIALIZED_NAME_KIND = "kind"; @SerializedName(SERIALIZED_NAME_KIND) @@ -75,7 +75,6 @@ public V1ValidatingAdmissionPolicyBindingList() { } public V1ValidatingAdmissionPolicyBindingList apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -89,14 +88,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1ValidatingAdmissionPolicyBindingList items(List items) { - this.items = items; return this; } @@ -113,19 +110,17 @@ public V1ValidatingAdmissionPolicyBindingList addItemsItem(V1ValidatingAdmission * List of PolicyBinding. * @return items **/ - @jakarta.annotation.Nullable + @jakarta.annotation.Nonnull public List getItems() { return items; } - public void setItems(List items) { this.items = items; } public V1ValidatingAdmissionPolicyBindingList kind(String kind) { - this.kind = kind; return this; } @@ -139,14 +134,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1ValidatingAdmissionPolicyBindingList metadata(V1ListMeta metadata) { - this.metadata = metadata; return this; } @@ -160,7 +153,6 @@ public V1ListMeta getMetadata() { return metadata; } - public void setMetadata(V1ListMeta metadata) { this.metadata = metadata; } @@ -224,51 +216,56 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("items"); } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ValidatingAdmissionPolicyBindingList + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ValidatingAdmissionPolicyBindingList */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ValidatingAdmissionPolicyBindingList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ValidatingAdmissionPolicyBindingList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ValidatingAdmissionPolicyBindingList is not found in the empty JSON string", V1ValidatingAdmissionPolicyBindingList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ValidatingAdmissionPolicyBindingList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ValidatingAdmissionPolicyBindingList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ValidatingAdmissionPolicyBindingList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : V1ValidatingAdmissionPolicyBindingList.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } - if (jsonObj.get("items") != null && !jsonObj.get("items").isJsonNull()) { - JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); - if (jsonArrayitems != null) { - // ensure the json data is an array - if (!jsonObj.get("items").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `items` to be an array in the JSON string but got `%s`", jsonObj.get("items").toString())); - } - - // validate the optional field `items` (array) - for (int i = 0; i < jsonArrayitems.size(); i++) { - V1ValidatingAdmissionPolicyBinding.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject()); - }; - } + // ensure the json data is an array + if (!jsonObj.get("items").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `items` to be an array in the JSON string but got `%s`", jsonObj.get("items").toString())); } + + JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); + // validate the required field `items` (array) + for (int i = 0; i < jsonArrayitems.size(); i++) { + V1ValidatingAdmissionPolicyBinding.validateJsonElement(jsonArrayitems.get(i)); + }; if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ListMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ListMeta.validateJsonElement(jsonObj.get("metadata")); } } @@ -292,9 +289,9 @@ public void write(JsonWriter out, V1ValidatingAdmissionPolicyBindingList value) @Override public V1ValidatingAdmissionPolicyBindingList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -321,3 +318,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ValidatingAdmissionPolicyBindingSpec.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ValidatingAdmissionPolicyBindingSpec.java index 90cf4d8f29..a1f795eec8 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ValidatingAdmissionPolicyBindingSpec.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ValidatingAdmissionPolicyBindingSpec.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1ParamRef; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * ValidatingAdmissionPolicyBindingSpec is the specification of the ValidatingAdmissionPolicyBinding. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ValidatingAdmissionPolicyBindingSpec { public static final String SERIALIZED_NAME_MATCH_RESOURCES = "matchResources"; @SerializedName(SERIALIZED_NAME_MATCH_RESOURCES) @@ -69,13 +69,12 @@ public class V1ValidatingAdmissionPolicyBindingSpec { public static final String SERIALIZED_NAME_VALIDATION_ACTIONS = "validationActions"; @SerializedName(SERIALIZED_NAME_VALIDATION_ACTIONS) - private List validationActions; + private List validationActions = new ArrayList<>(); public V1ValidatingAdmissionPolicyBindingSpec() { } public V1ValidatingAdmissionPolicyBindingSpec matchResources(V1MatchResources matchResources) { - this.matchResources = matchResources; return this; } @@ -89,14 +88,12 @@ public V1MatchResources getMatchResources() { return matchResources; } - public void setMatchResources(V1MatchResources matchResources) { this.matchResources = matchResources; } public V1ValidatingAdmissionPolicyBindingSpec paramRef(V1ParamRef paramRef) { - this.paramRef = paramRef; return this; } @@ -110,14 +107,12 @@ public V1ParamRef getParamRef() { return paramRef; } - public void setParamRef(V1ParamRef paramRef) { this.paramRef = paramRef; } public V1ValidatingAdmissionPolicyBindingSpec policyName(String policyName) { - this.policyName = policyName; return this; } @@ -131,14 +126,12 @@ public String getPolicyName() { return policyName; } - public void setPolicyName(String policyName) { this.policyName = policyName; } public V1ValidatingAdmissionPolicyBindingSpec validationActions(List validationActions) { - this.validationActions = validationActions; return this; } @@ -160,7 +153,6 @@ public List getValidationActions() { return validationActions; } - public void setValidationActions(List validationActions) { this.validationActions = validationActions; } @@ -227,38 +219,39 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ValidatingAdmissionPolicyBindingSpec + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ValidatingAdmissionPolicyBindingSpec */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ValidatingAdmissionPolicyBindingSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ValidatingAdmissionPolicyBindingSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ValidatingAdmissionPolicyBindingSpec is not found in the empty JSON string", V1ValidatingAdmissionPolicyBindingSpec.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ValidatingAdmissionPolicyBindingSpec.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ValidatingAdmissionPolicyBindingSpec` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ValidatingAdmissionPolicyBindingSpec` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `matchResources` if (jsonObj.get("matchResources") != null && !jsonObj.get("matchResources").isJsonNull()) { - V1MatchResources.validateJsonObject(jsonObj.getAsJsonObject("matchResources")); + V1MatchResources.validateJsonElement(jsonObj.get("matchResources")); } // validate the optional field `paramRef` if (jsonObj.get("paramRef") != null && !jsonObj.get("paramRef").isJsonNull()) { - V1ParamRef.validateJsonObject(jsonObj.getAsJsonObject("paramRef")); + V1ParamRef.validateJsonElement(jsonObj.get("paramRef")); } if ((jsonObj.get("policyName") != null && !jsonObj.get("policyName").isJsonNull()) && !jsonObj.get("policyName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `policyName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("policyName").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("validationActions") != null && !jsonObj.get("validationActions").isJsonArray()) { + if (jsonObj.get("validationActions") != null && !jsonObj.get("validationActions").isJsonNull() && !jsonObj.get("validationActions").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `validationActions` to be an array in the JSON string but got `%s`", jsonObj.get("validationActions").toString())); } } @@ -283,9 +276,9 @@ public void write(JsonWriter out, V1ValidatingAdmissionPolicyBindingSpec value) @Override public V1ValidatingAdmissionPolicyBindingSpec read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -312,3 +305,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ValidatingAdmissionPolicyList.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ValidatingAdmissionPolicyList.java index 4c88accac6..0ae3cc714e 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ValidatingAdmissionPolicyList.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ValidatingAdmissionPolicyList.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1ValidatingAdmissionPolicy; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * ValidatingAdmissionPolicyList is a list of ValidatingAdmissionPolicy. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ValidatingAdmissionPolicyList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -61,7 +61,7 @@ public class V1ValidatingAdmissionPolicyList implements io.kubernetes.client.com public static final String SERIALIZED_NAME_ITEMS = "items"; @SerializedName(SERIALIZED_NAME_ITEMS) - private List items; + private List items = new ArrayList<>(); public static final String SERIALIZED_NAME_KIND = "kind"; @SerializedName(SERIALIZED_NAME_KIND) @@ -75,7 +75,6 @@ public V1ValidatingAdmissionPolicyList() { } public V1ValidatingAdmissionPolicyList apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -89,14 +88,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1ValidatingAdmissionPolicyList items(List items) { - this.items = items; return this; } @@ -113,19 +110,17 @@ public V1ValidatingAdmissionPolicyList addItemsItem(V1ValidatingAdmissionPolicy * List of ValidatingAdmissionPolicy. * @return items **/ - @jakarta.annotation.Nullable + @jakarta.annotation.Nonnull public List getItems() { return items; } - public void setItems(List items) { this.items = items; } public V1ValidatingAdmissionPolicyList kind(String kind) { - this.kind = kind; return this; } @@ -139,14 +134,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1ValidatingAdmissionPolicyList metadata(V1ListMeta metadata) { - this.metadata = metadata; return this; } @@ -160,7 +153,6 @@ public V1ListMeta getMetadata() { return metadata; } - public void setMetadata(V1ListMeta metadata) { this.metadata = metadata; } @@ -224,51 +216,56 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("items"); } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ValidatingAdmissionPolicyList + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ValidatingAdmissionPolicyList */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ValidatingAdmissionPolicyList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ValidatingAdmissionPolicyList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ValidatingAdmissionPolicyList is not found in the empty JSON string", V1ValidatingAdmissionPolicyList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ValidatingAdmissionPolicyList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ValidatingAdmissionPolicyList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ValidatingAdmissionPolicyList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : V1ValidatingAdmissionPolicyList.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } - if (jsonObj.get("items") != null && !jsonObj.get("items").isJsonNull()) { - JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); - if (jsonArrayitems != null) { - // ensure the json data is an array - if (!jsonObj.get("items").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `items` to be an array in the JSON string but got `%s`", jsonObj.get("items").toString())); - } - - // validate the optional field `items` (array) - for (int i = 0; i < jsonArrayitems.size(); i++) { - V1ValidatingAdmissionPolicy.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject()); - }; - } + // ensure the json data is an array + if (!jsonObj.get("items").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `items` to be an array in the JSON string but got `%s`", jsonObj.get("items").toString())); } + + JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); + // validate the required field `items` (array) + for (int i = 0; i < jsonArrayitems.size(); i++) { + V1ValidatingAdmissionPolicy.validateJsonElement(jsonArrayitems.get(i)); + }; if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ListMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ListMeta.validateJsonElement(jsonObj.get("metadata")); } } @@ -292,9 +289,9 @@ public void write(JsonWriter out, V1ValidatingAdmissionPolicyList value) throws @Override public V1ValidatingAdmissionPolicyList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -321,3 +318,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ValidatingAdmissionPolicySpec.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ValidatingAdmissionPolicySpec.java index aa506e3e1b..6914baba72 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ValidatingAdmissionPolicySpec.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ValidatingAdmissionPolicySpec.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -27,6 +27,7 @@ import io.kubernetes.client.openapi.models.V1Variable; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -49,7 +50,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -57,11 +57,11 @@ /** * ValidatingAdmissionPolicySpec is the specification of the desired behavior of the AdmissionPolicy. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ValidatingAdmissionPolicySpec { public static final String SERIALIZED_NAME_AUDIT_ANNOTATIONS = "auditAnnotations"; @SerializedName(SERIALIZED_NAME_AUDIT_ANNOTATIONS) - private List auditAnnotations; + private List auditAnnotations = new ArrayList<>(); public static final String SERIALIZED_NAME_FAILURE_POLICY = "failurePolicy"; @SerializedName(SERIALIZED_NAME_FAILURE_POLICY) @@ -69,7 +69,7 @@ public class V1ValidatingAdmissionPolicySpec { public static final String SERIALIZED_NAME_MATCH_CONDITIONS = "matchConditions"; @SerializedName(SERIALIZED_NAME_MATCH_CONDITIONS) - private List matchConditions; + private List matchConditions = new ArrayList<>(); public static final String SERIALIZED_NAME_MATCH_CONSTRAINTS = "matchConstraints"; @SerializedName(SERIALIZED_NAME_MATCH_CONSTRAINTS) @@ -81,17 +81,16 @@ public class V1ValidatingAdmissionPolicySpec { public static final String SERIALIZED_NAME_VALIDATIONS = "validations"; @SerializedName(SERIALIZED_NAME_VALIDATIONS) - private List validations; + private List validations = new ArrayList<>(); public static final String SERIALIZED_NAME_VARIABLES = "variables"; @SerializedName(SERIALIZED_NAME_VARIABLES) - private List variables; + private List variables = new ArrayList<>(); public V1ValidatingAdmissionPolicySpec() { } public V1ValidatingAdmissionPolicySpec auditAnnotations(List auditAnnotations) { - this.auditAnnotations = auditAnnotations; return this; } @@ -113,14 +112,12 @@ public List getAuditAnnotations() { return auditAnnotations; } - public void setAuditAnnotations(List auditAnnotations) { this.auditAnnotations = auditAnnotations; } public V1ValidatingAdmissionPolicySpec failurePolicy(String failurePolicy) { - this.failurePolicy = failurePolicy; return this; } @@ -134,14 +131,12 @@ public String getFailurePolicy() { return failurePolicy; } - public void setFailurePolicy(String failurePolicy) { this.failurePolicy = failurePolicy; } public V1ValidatingAdmissionPolicySpec matchConditions(List matchConditions) { - this.matchConditions = matchConditions; return this; } @@ -163,14 +158,12 @@ public List getMatchConditions() { return matchConditions; } - public void setMatchConditions(List matchConditions) { this.matchConditions = matchConditions; } public V1ValidatingAdmissionPolicySpec matchConstraints(V1MatchResources matchConstraints) { - this.matchConstraints = matchConstraints; return this; } @@ -184,14 +177,12 @@ public V1MatchResources getMatchConstraints() { return matchConstraints; } - public void setMatchConstraints(V1MatchResources matchConstraints) { this.matchConstraints = matchConstraints; } public V1ValidatingAdmissionPolicySpec paramKind(V1ParamKind paramKind) { - this.paramKind = paramKind; return this; } @@ -205,14 +196,12 @@ public V1ParamKind getParamKind() { return paramKind; } - public void setParamKind(V1ParamKind paramKind) { this.paramKind = paramKind; } public V1ValidatingAdmissionPolicySpec validations(List validations) { - this.validations = validations; return this; } @@ -234,14 +223,12 @@ public List getValidations() { return validations; } - public void setValidations(List validations) { this.validations = validations; } public V1ValidatingAdmissionPolicySpec variables(List variables) { - this.variables = variables; return this; } @@ -263,7 +250,6 @@ public List getVariables() { return variables; } - public void setVariables(List variables) { this.variables = variables; } @@ -339,25 +325,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ValidatingAdmissionPolicySpec + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ValidatingAdmissionPolicySpec */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ValidatingAdmissionPolicySpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ValidatingAdmissionPolicySpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ValidatingAdmissionPolicySpec is not found in the empty JSON string", V1ValidatingAdmissionPolicySpec.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ValidatingAdmissionPolicySpec.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ValidatingAdmissionPolicySpec` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ValidatingAdmissionPolicySpec` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (jsonObj.get("auditAnnotations") != null && !jsonObj.get("auditAnnotations").isJsonNull()) { JsonArray jsonArrayauditAnnotations = jsonObj.getAsJsonArray("auditAnnotations"); if (jsonArrayauditAnnotations != null) { @@ -368,7 +355,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `auditAnnotations` (array) for (int i = 0; i < jsonArrayauditAnnotations.size(); i++) { - V1AuditAnnotation.validateJsonObject(jsonArrayauditAnnotations.get(i).getAsJsonObject()); + V1AuditAnnotation.validateJsonElement(jsonArrayauditAnnotations.get(i)); }; } } @@ -385,17 +372,17 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `matchConditions` (array) for (int i = 0; i < jsonArraymatchConditions.size(); i++) { - V1MatchCondition.validateJsonObject(jsonArraymatchConditions.get(i).getAsJsonObject()); + V1MatchCondition.validateJsonElement(jsonArraymatchConditions.get(i)); }; } } // validate the optional field `matchConstraints` if (jsonObj.get("matchConstraints") != null && !jsonObj.get("matchConstraints").isJsonNull()) { - V1MatchResources.validateJsonObject(jsonObj.getAsJsonObject("matchConstraints")); + V1MatchResources.validateJsonElement(jsonObj.get("matchConstraints")); } // validate the optional field `paramKind` if (jsonObj.get("paramKind") != null && !jsonObj.get("paramKind").isJsonNull()) { - V1ParamKind.validateJsonObject(jsonObj.getAsJsonObject("paramKind")); + V1ParamKind.validateJsonElement(jsonObj.get("paramKind")); } if (jsonObj.get("validations") != null && !jsonObj.get("validations").isJsonNull()) { JsonArray jsonArrayvalidations = jsonObj.getAsJsonArray("validations"); @@ -407,7 +394,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `validations` (array) for (int i = 0; i < jsonArrayvalidations.size(); i++) { - V1Validation.validateJsonObject(jsonArrayvalidations.get(i).getAsJsonObject()); + V1Validation.validateJsonElement(jsonArrayvalidations.get(i)); }; } } @@ -421,7 +408,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `variables` (array) for (int i = 0; i < jsonArrayvariables.size(); i++) { - V1Variable.validateJsonObject(jsonArrayvariables.get(i).getAsJsonObject()); + V1Variable.validateJsonElement(jsonArrayvariables.get(i)); }; } } @@ -447,9 +434,9 @@ public void write(JsonWriter out, V1ValidatingAdmissionPolicySpec value) throws @Override public V1ValidatingAdmissionPolicySpec read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -476,3 +463,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ValidatingAdmissionPolicyStatus.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ValidatingAdmissionPolicyStatus.java index 3c6fd240c8..37ff7c5176 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ValidatingAdmissionPolicyStatus.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ValidatingAdmissionPolicyStatus.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1TypeChecking; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,11 +53,11 @@ /** * ValidatingAdmissionPolicyStatus represents the status of an admission validation policy. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ValidatingAdmissionPolicyStatus { public static final String SERIALIZED_NAME_CONDITIONS = "conditions"; @SerializedName(SERIALIZED_NAME_CONDITIONS) - private List conditions; + private List conditions = new ArrayList<>(); public static final String SERIALIZED_NAME_OBSERVED_GENERATION = "observedGeneration"; @SerializedName(SERIALIZED_NAME_OBSERVED_GENERATION) @@ -71,7 +71,6 @@ public V1ValidatingAdmissionPolicyStatus() { } public V1ValidatingAdmissionPolicyStatus conditions(List conditions) { - this.conditions = conditions; return this; } @@ -93,14 +92,12 @@ public List getConditions() { return conditions; } - public void setConditions(List conditions) { this.conditions = conditions; } public V1ValidatingAdmissionPolicyStatus observedGeneration(Long observedGeneration) { - this.observedGeneration = observedGeneration; return this; } @@ -114,14 +111,12 @@ public Long getObservedGeneration() { return observedGeneration; } - public void setObservedGeneration(Long observedGeneration) { this.observedGeneration = observedGeneration; } public V1ValidatingAdmissionPolicyStatus typeChecking(V1TypeChecking typeChecking) { - this.typeChecking = typeChecking; return this; } @@ -135,7 +130,6 @@ public V1TypeChecking getTypeChecking() { return typeChecking; } - public void setTypeChecking(V1TypeChecking typeChecking) { this.typeChecking = typeChecking; } @@ -199,25 +193,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ValidatingAdmissionPolicyStatus + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ValidatingAdmissionPolicyStatus */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ValidatingAdmissionPolicyStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ValidatingAdmissionPolicyStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ValidatingAdmissionPolicyStatus is not found in the empty JSON string", V1ValidatingAdmissionPolicyStatus.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ValidatingAdmissionPolicyStatus.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ValidatingAdmissionPolicyStatus` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ValidatingAdmissionPolicyStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (jsonObj.get("conditions") != null && !jsonObj.get("conditions").isJsonNull()) { JsonArray jsonArrayconditions = jsonObj.getAsJsonArray("conditions"); if (jsonArrayconditions != null) { @@ -228,13 +223,13 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `conditions` (array) for (int i = 0; i < jsonArrayconditions.size(); i++) { - V1Condition.validateJsonObject(jsonArrayconditions.get(i).getAsJsonObject()); + V1Condition.validateJsonElement(jsonArrayconditions.get(i)); }; } } // validate the optional field `typeChecking` if (jsonObj.get("typeChecking") != null && !jsonObj.get("typeChecking").isJsonNull()) { - V1TypeChecking.validateJsonObject(jsonObj.getAsJsonObject("typeChecking")); + V1TypeChecking.validateJsonElement(jsonObj.get("typeChecking")); } } @@ -258,9 +253,9 @@ public void write(JsonWriter out, V1ValidatingAdmissionPolicyStatus value) throw @Override public V1ValidatingAdmissionPolicyStatus read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -287,3 +282,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ValidatingWebhook.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ValidatingWebhook.java index 5eaefc019d..c6024831b2 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ValidatingWebhook.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ValidatingWebhook.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -25,6 +25,7 @@ import io.kubernetes.client.openapi.models.V1RuleWithOperations; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -47,7 +48,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -55,7 +55,7 @@ /** * ValidatingWebhook describes an admission webhook and the resources and operations it applies to. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ValidatingWebhook { public static final String SERIALIZED_NAME_ADMISSION_REVIEW_VERSIONS = "admissionReviewVersions"; @SerializedName(SERIALIZED_NAME_ADMISSION_REVIEW_VERSIONS) @@ -71,7 +71,7 @@ public class V1ValidatingWebhook { public static final String SERIALIZED_NAME_MATCH_CONDITIONS = "matchConditions"; @SerializedName(SERIALIZED_NAME_MATCH_CONDITIONS) - private List matchConditions; + private List matchConditions = new ArrayList<>(); public static final String SERIALIZED_NAME_MATCH_POLICY = "matchPolicy"; @SerializedName(SERIALIZED_NAME_MATCH_POLICY) @@ -91,7 +91,7 @@ public class V1ValidatingWebhook { public static final String SERIALIZED_NAME_RULES = "rules"; @SerializedName(SERIALIZED_NAME_RULES) - private List rules; + private List rules = new ArrayList<>(); public static final String SERIALIZED_NAME_SIDE_EFFECTS = "sideEffects"; @SerializedName(SERIALIZED_NAME_SIDE_EFFECTS) @@ -105,7 +105,6 @@ public V1ValidatingWebhook() { } public V1ValidatingWebhook admissionReviewVersions(List admissionReviewVersions) { - this.admissionReviewVersions = admissionReviewVersions; return this; } @@ -127,14 +126,12 @@ public List getAdmissionReviewVersions() { return admissionReviewVersions; } - public void setAdmissionReviewVersions(List admissionReviewVersions) { this.admissionReviewVersions = admissionReviewVersions; } public V1ValidatingWebhook clientConfig(AdmissionregistrationV1WebhookClientConfig clientConfig) { - this.clientConfig = clientConfig; return this; } @@ -148,14 +145,12 @@ public AdmissionregistrationV1WebhookClientConfig getClientConfig() { return clientConfig; } - public void setClientConfig(AdmissionregistrationV1WebhookClientConfig clientConfig) { this.clientConfig = clientConfig; } public V1ValidatingWebhook failurePolicy(String failurePolicy) { - this.failurePolicy = failurePolicy; return this; } @@ -169,14 +164,12 @@ public String getFailurePolicy() { return failurePolicy; } - public void setFailurePolicy(String failurePolicy) { this.failurePolicy = failurePolicy; } public V1ValidatingWebhook matchConditions(List matchConditions) { - this.matchConditions = matchConditions; return this; } @@ -198,14 +191,12 @@ public List getMatchConditions() { return matchConditions; } - public void setMatchConditions(List matchConditions) { this.matchConditions = matchConditions; } public V1ValidatingWebhook matchPolicy(String matchPolicy) { - this.matchPolicy = matchPolicy; return this; } @@ -219,14 +210,12 @@ public String getMatchPolicy() { return matchPolicy; } - public void setMatchPolicy(String matchPolicy) { this.matchPolicy = matchPolicy; } public V1ValidatingWebhook name(String name) { - this.name = name; return this; } @@ -240,14 +229,12 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } public V1ValidatingWebhook namespaceSelector(V1LabelSelector namespaceSelector) { - this.namespaceSelector = namespaceSelector; return this; } @@ -261,14 +248,12 @@ public V1LabelSelector getNamespaceSelector() { return namespaceSelector; } - public void setNamespaceSelector(V1LabelSelector namespaceSelector) { this.namespaceSelector = namespaceSelector; } public V1ValidatingWebhook objectSelector(V1LabelSelector objectSelector) { - this.objectSelector = objectSelector; return this; } @@ -282,14 +267,12 @@ public V1LabelSelector getObjectSelector() { return objectSelector; } - public void setObjectSelector(V1LabelSelector objectSelector) { this.objectSelector = objectSelector; } public V1ValidatingWebhook rules(List rules) { - this.rules = rules; return this; } @@ -311,14 +294,12 @@ public List getRules() { return rules; } - public void setRules(List rules) { this.rules = rules; } public V1ValidatingWebhook sideEffects(String sideEffects) { - this.sideEffects = sideEffects; return this; } @@ -332,14 +313,12 @@ public String getSideEffects() { return sideEffects; } - public void setSideEffects(String sideEffects) { this.sideEffects = sideEffects; } public V1ValidatingWebhook timeoutSeconds(Integer timeoutSeconds) { - this.timeoutSeconds = timeoutSeconds; return this; } @@ -353,7 +332,6 @@ public Integer getTimeoutSeconds() { return timeoutSeconds; } - public void setTimeoutSeconds(Integer timeoutSeconds) { this.timeoutSeconds = timeoutSeconds; } @@ -445,32 +423,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ValidatingWebhook + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ValidatingWebhook */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ValidatingWebhook.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ValidatingWebhook.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ValidatingWebhook is not found in the empty JSON string", V1ValidatingWebhook.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ValidatingWebhook.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ValidatingWebhook` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ValidatingWebhook` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1ValidatingWebhook.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the required json array is present if (jsonObj.get("admissionReviewVersions") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); @@ -478,7 +457,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("Expected the field `admissionReviewVersions` to be an array in the JSON string but got `%s`", jsonObj.get("admissionReviewVersions").toString())); } // validate the required field `clientConfig` - AdmissionregistrationV1WebhookClientConfig.validateJsonObject(jsonObj.getAsJsonObject("clientConfig")); + AdmissionregistrationV1WebhookClientConfig.validateJsonElement(jsonObj.get("clientConfig")); if ((jsonObj.get("failurePolicy") != null && !jsonObj.get("failurePolicy").isJsonNull()) && !jsonObj.get("failurePolicy").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `failurePolicy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("failurePolicy").toString())); } @@ -492,7 +471,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `matchConditions` (array) for (int i = 0; i < jsonArraymatchConditions.size(); i++) { - V1MatchCondition.validateJsonObject(jsonArraymatchConditions.get(i).getAsJsonObject()); + V1MatchCondition.validateJsonElement(jsonArraymatchConditions.get(i)); }; } } @@ -504,11 +483,11 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `namespaceSelector` if (jsonObj.get("namespaceSelector") != null && !jsonObj.get("namespaceSelector").isJsonNull()) { - V1LabelSelector.validateJsonObject(jsonObj.getAsJsonObject("namespaceSelector")); + V1LabelSelector.validateJsonElement(jsonObj.get("namespaceSelector")); } // validate the optional field `objectSelector` if (jsonObj.get("objectSelector") != null && !jsonObj.get("objectSelector").isJsonNull()) { - V1LabelSelector.validateJsonObject(jsonObj.getAsJsonObject("objectSelector")); + V1LabelSelector.validateJsonElement(jsonObj.get("objectSelector")); } if (jsonObj.get("rules") != null && !jsonObj.get("rules").isJsonNull()) { JsonArray jsonArrayrules = jsonObj.getAsJsonArray("rules"); @@ -520,7 +499,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `rules` (array) for (int i = 0; i < jsonArrayrules.size(); i++) { - V1RuleWithOperations.validateJsonObject(jsonArrayrules.get(i).getAsJsonObject()); + V1RuleWithOperations.validateJsonElement(jsonArrayrules.get(i)); }; } } @@ -549,9 +528,9 @@ public void write(JsonWriter out, V1ValidatingWebhook value) throws IOException @Override public V1ValidatingWebhook read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -578,3 +557,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ValidatingWebhookConfiguration.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ValidatingWebhookConfiguration.java index 1938ffedb6..7be0298631 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ValidatingWebhookConfiguration.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ValidatingWebhookConfiguration.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1ValidatingWebhook; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * ValidatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and object without changing it. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ValidatingWebhookConfiguration implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -69,13 +69,12 @@ public class V1ValidatingWebhookConfiguration implements io.kubernetes.client.co public static final String SERIALIZED_NAME_WEBHOOKS = "webhooks"; @SerializedName(SERIALIZED_NAME_WEBHOOKS) - private List webhooks; + private List webhooks = new ArrayList<>(); public V1ValidatingWebhookConfiguration() { } public V1ValidatingWebhookConfiguration apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -89,14 +88,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1ValidatingWebhookConfiguration kind(String kind) { - this.kind = kind; return this; } @@ -110,14 +107,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1ValidatingWebhookConfiguration metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -131,14 +126,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V1ValidatingWebhookConfiguration webhooks(List webhooks) { - this.webhooks = webhooks; return this; } @@ -160,7 +153,6 @@ public List getWebhooks() { return webhooks; } - public void setWebhooks(List webhooks) { this.webhooks = webhooks; } @@ -227,25 +219,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ValidatingWebhookConfiguration + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ValidatingWebhookConfiguration */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ValidatingWebhookConfiguration.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ValidatingWebhookConfiguration.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ValidatingWebhookConfiguration is not found in the empty JSON string", V1ValidatingWebhookConfiguration.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ValidatingWebhookConfiguration.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ValidatingWebhookConfiguration` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ValidatingWebhookConfiguration` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -254,7 +247,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } if (jsonObj.get("webhooks") != null && !jsonObj.get("webhooks").isJsonNull()) { JsonArray jsonArraywebhooks = jsonObj.getAsJsonArray("webhooks"); @@ -266,7 +259,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `webhooks` (array) for (int i = 0; i < jsonArraywebhooks.size(); i++) { - V1ValidatingWebhook.validateJsonObject(jsonArraywebhooks.get(i).getAsJsonObject()); + V1ValidatingWebhook.validateJsonElement(jsonArraywebhooks.get(i)); }; } } @@ -292,9 +285,9 @@ public void write(JsonWriter out, V1ValidatingWebhookConfiguration value) throws @Override public V1ValidatingWebhookConfiguration read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -321,3 +314,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ValidatingWebhookConfigurationList.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ValidatingWebhookConfigurationList.java index 4b83a75c58..8963a12e64 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ValidatingWebhookConfigurationList.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ValidatingWebhookConfigurationList.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1ValidatingWebhookConfiguration; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * ValidatingWebhookConfigurationList is a list of ValidatingWebhookConfiguration. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ValidatingWebhookConfigurationList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -75,7 +75,6 @@ public V1ValidatingWebhookConfigurationList() { } public V1ValidatingWebhookConfigurationList apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -89,14 +88,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1ValidatingWebhookConfigurationList items(List items) { - this.items = items; return this; } @@ -118,14 +115,12 @@ public List getItems() { return items; } - public void setItems(List items) { this.items = items; } public V1ValidatingWebhookConfigurationList kind(String kind) { - this.kind = kind; return this; } @@ -139,14 +134,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1ValidatingWebhookConfigurationList metadata(V1ListMeta metadata) { - this.metadata = metadata; return this; } @@ -160,7 +153,6 @@ public V1ListMeta getMetadata() { return metadata; } - public void setMetadata(V1ListMeta metadata) { this.metadata = metadata; } @@ -228,32 +220,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ValidatingWebhookConfigurationList + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ValidatingWebhookConfigurationList */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ValidatingWebhookConfigurationList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ValidatingWebhookConfigurationList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ValidatingWebhookConfigurationList is not found in the empty JSON string", V1ValidatingWebhookConfigurationList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ValidatingWebhookConfigurationList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ValidatingWebhookConfigurationList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ValidatingWebhookConfigurationList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1ValidatingWebhookConfigurationList.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -265,14 +258,14 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); // validate the required field `items` (array) for (int i = 0; i < jsonArrayitems.size(); i++) { - V1ValidatingWebhookConfiguration.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject()); + V1ValidatingWebhookConfiguration.validateJsonElement(jsonArrayitems.get(i)); }; if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ListMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ListMeta.validateJsonElement(jsonObj.get("metadata")); } } @@ -296,9 +289,9 @@ public void write(JsonWriter out, V1ValidatingWebhookConfigurationList value) th @Override public V1ValidatingWebhookConfigurationList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -325,3 +318,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Validation.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Validation.java index bf3554c365..0b275ae441 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Validation.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Validation.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * Validation specifies the CEL expression which is used to apply the validation. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1Validation { public static final String SERIALIZED_NAME_EXPRESSION = "expression"; @SerializedName(SERIALIZED_NAME_EXPRESSION) @@ -71,7 +71,6 @@ public V1Validation() { } public V1Validation expression(String expression) { - this.expression = expression; return this; } @@ -85,14 +84,12 @@ public String getExpression() { return expression; } - public void setExpression(String expression) { this.expression = expression; } public V1Validation message(String message) { - this.message = message; return this; } @@ -106,14 +103,12 @@ public String getMessage() { return message; } - public void setMessage(String message) { this.message = message; } public V1Validation messageExpression(String messageExpression) { - this.messageExpression = messageExpression; return this; } @@ -127,14 +122,12 @@ public String getMessageExpression() { return messageExpression; } - public void setMessageExpression(String messageExpression) { this.messageExpression = messageExpression; } public V1Validation reason(String reason) { - this.reason = reason; return this; } @@ -148,7 +141,6 @@ public String getReason() { return reason; } - public void setReason(String reason) { this.reason = reason; } @@ -216,32 +208,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1Validation + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1Validation */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1Validation.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1Validation.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1Validation is not found in the empty JSON string", V1Validation.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1Validation.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1Validation` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1Validation` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1Validation.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("expression").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `expression` to be a primitive type in the JSON string but got `%s`", jsonObj.get("expression").toString())); } @@ -276,9 +269,9 @@ public void write(JsonWriter out, V1Validation value) throws IOException { @Override public V1Validation read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -305,3 +298,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ValidationRule.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ValidationRule.java index bcac05f690..40084a957a 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ValidationRule.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1ValidationRule.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * ValidationRule describes a validation rule written in the CEL expression language. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1ValidationRule { public static final String SERIALIZED_NAME_FIELD_PATH = "fieldPath"; @SerializedName(SERIALIZED_NAME_FIELD_PATH) @@ -79,7 +79,6 @@ public V1ValidationRule() { } public V1ValidationRule fieldPath(String fieldPath) { - this.fieldPath = fieldPath; return this; } @@ -93,14 +92,12 @@ public String getFieldPath() { return fieldPath; } - public void setFieldPath(String fieldPath) { this.fieldPath = fieldPath; } public V1ValidationRule message(String message) { - this.message = message; return this; } @@ -114,14 +111,12 @@ public String getMessage() { return message; } - public void setMessage(String message) { this.message = message; } public V1ValidationRule messageExpression(String messageExpression) { - this.messageExpression = messageExpression; return this; } @@ -135,14 +130,12 @@ public String getMessageExpression() { return messageExpression; } - public void setMessageExpression(String messageExpression) { this.messageExpression = messageExpression; } public V1ValidationRule optionalOldSelf(Boolean optionalOldSelf) { - this.optionalOldSelf = optionalOldSelf; return this; } @@ -156,14 +149,12 @@ public Boolean getOptionalOldSelf() { return optionalOldSelf; } - public void setOptionalOldSelf(Boolean optionalOldSelf) { this.optionalOldSelf = optionalOldSelf; } public V1ValidationRule reason(String reason) { - this.reason = reason; return this; } @@ -177,14 +168,12 @@ public String getReason() { return reason; } - public void setReason(String reason) { this.reason = reason; } public V1ValidationRule rule(String rule) { - this.rule = rule; return this; } @@ -198,7 +187,6 @@ public String getRule() { return rule; } - public void setRule(String rule) { this.rule = rule; } @@ -272,32 +260,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1ValidationRule + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1ValidationRule */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1ValidationRule.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1ValidationRule.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1ValidationRule is not found in the empty JSON string", V1ValidationRule.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1ValidationRule.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ValidationRule` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1ValidationRule` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1ValidationRule.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("fieldPath") != null && !jsonObj.get("fieldPath").isJsonNull()) && !jsonObj.get("fieldPath").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `fieldPath` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fieldPath").toString())); } @@ -335,9 +324,9 @@ public void write(JsonWriter out, V1ValidationRule value) throws IOException { @Override public V1ValidationRule read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -364,3 +353,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Variable.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Variable.java index 46e42dd987..d549cdc05c 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Variable.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Variable.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * Variable is the definition of a variable that is used for composition. A variable is defined as a named expression. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1Variable { public static final String SERIALIZED_NAME_EXPRESSION = "expression"; @SerializedName(SERIALIZED_NAME_EXPRESSION) @@ -63,7 +63,6 @@ public V1Variable() { } public V1Variable expression(String expression) { - this.expression = expression; return this; } @@ -77,14 +76,12 @@ public String getExpression() { return expression; } - public void setExpression(String expression) { this.expression = expression; } public V1Variable name(String name) { - this.name = name; return this; } @@ -98,7 +95,6 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } @@ -161,32 +157,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1Variable + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1Variable */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1Variable.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1Variable.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1Variable is not found in the empty JSON string", V1Variable.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1Variable.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1Variable` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1Variable` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1Variable.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("expression").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `expression` to be a primitive type in the JSON string but got `%s`", jsonObj.get("expression").toString())); } @@ -215,9 +212,9 @@ public void write(JsonWriter out, V1Variable value) throws IOException { @Override public V1Variable read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -244,3 +241,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Volume.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Volume.java index 08e8c3848c..c2509acbee 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Volume.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Volume.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -49,6 +49,7 @@ import io.kubernetes.client.openapi.models.V1StorageOSVolumeSource; import io.kubernetes.client.openapi.models.V1VsphereVirtualDiskVolumeSource; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -70,7 +71,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -78,7 +78,7 @@ /** * Volume represents a named volume in a pod that may be accessed by any container in the pod. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1Volume { public static final String SERIALIZED_NAME_AWS_ELASTIC_BLOCK_STORE = "awsElasticBlockStore"; @SerializedName(SERIALIZED_NAME_AWS_ELASTIC_BLOCK_STORE) @@ -204,7 +204,6 @@ public V1Volume() { } public V1Volume awsElasticBlockStore(V1AWSElasticBlockStoreVolumeSource awsElasticBlockStore) { - this.awsElasticBlockStore = awsElasticBlockStore; return this; } @@ -218,14 +217,12 @@ public V1AWSElasticBlockStoreVolumeSource getAwsElasticBlockStore() { return awsElasticBlockStore; } - public void setAwsElasticBlockStore(V1AWSElasticBlockStoreVolumeSource awsElasticBlockStore) { this.awsElasticBlockStore = awsElasticBlockStore; } public V1Volume azureDisk(V1AzureDiskVolumeSource azureDisk) { - this.azureDisk = azureDisk; return this; } @@ -239,14 +236,12 @@ public V1AzureDiskVolumeSource getAzureDisk() { return azureDisk; } - public void setAzureDisk(V1AzureDiskVolumeSource azureDisk) { this.azureDisk = azureDisk; } public V1Volume azureFile(V1AzureFileVolumeSource azureFile) { - this.azureFile = azureFile; return this; } @@ -260,14 +255,12 @@ public V1AzureFileVolumeSource getAzureFile() { return azureFile; } - public void setAzureFile(V1AzureFileVolumeSource azureFile) { this.azureFile = azureFile; } public V1Volume cephfs(V1CephFSVolumeSource cephfs) { - this.cephfs = cephfs; return this; } @@ -281,14 +274,12 @@ public V1CephFSVolumeSource getCephfs() { return cephfs; } - public void setCephfs(V1CephFSVolumeSource cephfs) { this.cephfs = cephfs; } public V1Volume cinder(V1CinderVolumeSource cinder) { - this.cinder = cinder; return this; } @@ -302,14 +293,12 @@ public V1CinderVolumeSource getCinder() { return cinder; } - public void setCinder(V1CinderVolumeSource cinder) { this.cinder = cinder; } public V1Volume configMap(V1ConfigMapVolumeSource configMap) { - this.configMap = configMap; return this; } @@ -323,14 +312,12 @@ public V1ConfigMapVolumeSource getConfigMap() { return configMap; } - public void setConfigMap(V1ConfigMapVolumeSource configMap) { this.configMap = configMap; } public V1Volume csi(V1CSIVolumeSource csi) { - this.csi = csi; return this; } @@ -344,14 +331,12 @@ public V1CSIVolumeSource getCsi() { return csi; } - public void setCsi(V1CSIVolumeSource csi) { this.csi = csi; } public V1Volume downwardAPI(V1DownwardAPIVolumeSource downwardAPI) { - this.downwardAPI = downwardAPI; return this; } @@ -365,14 +350,12 @@ public V1DownwardAPIVolumeSource getDownwardAPI() { return downwardAPI; } - public void setDownwardAPI(V1DownwardAPIVolumeSource downwardAPI) { this.downwardAPI = downwardAPI; } public V1Volume emptyDir(V1EmptyDirVolumeSource emptyDir) { - this.emptyDir = emptyDir; return this; } @@ -386,14 +369,12 @@ public V1EmptyDirVolumeSource getEmptyDir() { return emptyDir; } - public void setEmptyDir(V1EmptyDirVolumeSource emptyDir) { this.emptyDir = emptyDir; } public V1Volume ephemeral(V1EphemeralVolumeSource ephemeral) { - this.ephemeral = ephemeral; return this; } @@ -407,14 +388,12 @@ public V1EphemeralVolumeSource getEphemeral() { return ephemeral; } - public void setEphemeral(V1EphemeralVolumeSource ephemeral) { this.ephemeral = ephemeral; } public V1Volume fc(V1FCVolumeSource fc) { - this.fc = fc; return this; } @@ -428,14 +407,12 @@ public V1FCVolumeSource getFc() { return fc; } - public void setFc(V1FCVolumeSource fc) { this.fc = fc; } public V1Volume flexVolume(V1FlexVolumeSource flexVolume) { - this.flexVolume = flexVolume; return this; } @@ -449,14 +426,12 @@ public V1FlexVolumeSource getFlexVolume() { return flexVolume; } - public void setFlexVolume(V1FlexVolumeSource flexVolume) { this.flexVolume = flexVolume; } public V1Volume flocker(V1FlockerVolumeSource flocker) { - this.flocker = flocker; return this; } @@ -470,14 +445,12 @@ public V1FlockerVolumeSource getFlocker() { return flocker; } - public void setFlocker(V1FlockerVolumeSource flocker) { this.flocker = flocker; } public V1Volume gcePersistentDisk(V1GCEPersistentDiskVolumeSource gcePersistentDisk) { - this.gcePersistentDisk = gcePersistentDisk; return this; } @@ -491,14 +464,12 @@ public V1GCEPersistentDiskVolumeSource getGcePersistentDisk() { return gcePersistentDisk; } - public void setGcePersistentDisk(V1GCEPersistentDiskVolumeSource gcePersistentDisk) { this.gcePersistentDisk = gcePersistentDisk; } public V1Volume gitRepo(V1GitRepoVolumeSource gitRepo) { - this.gitRepo = gitRepo; return this; } @@ -512,14 +483,12 @@ public V1GitRepoVolumeSource getGitRepo() { return gitRepo; } - public void setGitRepo(V1GitRepoVolumeSource gitRepo) { this.gitRepo = gitRepo; } public V1Volume glusterfs(V1GlusterfsVolumeSource glusterfs) { - this.glusterfs = glusterfs; return this; } @@ -533,14 +502,12 @@ public V1GlusterfsVolumeSource getGlusterfs() { return glusterfs; } - public void setGlusterfs(V1GlusterfsVolumeSource glusterfs) { this.glusterfs = glusterfs; } public V1Volume hostPath(V1HostPathVolumeSource hostPath) { - this.hostPath = hostPath; return this; } @@ -554,14 +521,12 @@ public V1HostPathVolumeSource getHostPath() { return hostPath; } - public void setHostPath(V1HostPathVolumeSource hostPath) { this.hostPath = hostPath; } public V1Volume iscsi(V1ISCSIVolumeSource iscsi) { - this.iscsi = iscsi; return this; } @@ -575,14 +540,12 @@ public V1ISCSIVolumeSource getIscsi() { return iscsi; } - public void setIscsi(V1ISCSIVolumeSource iscsi) { this.iscsi = iscsi; } public V1Volume name(String name) { - this.name = name; return this; } @@ -596,14 +559,12 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } public V1Volume nfs(V1NFSVolumeSource nfs) { - this.nfs = nfs; return this; } @@ -617,14 +578,12 @@ public V1NFSVolumeSource getNfs() { return nfs; } - public void setNfs(V1NFSVolumeSource nfs) { this.nfs = nfs; } public V1Volume persistentVolumeClaim(V1PersistentVolumeClaimVolumeSource persistentVolumeClaim) { - this.persistentVolumeClaim = persistentVolumeClaim; return this; } @@ -638,14 +597,12 @@ public V1PersistentVolumeClaimVolumeSource getPersistentVolumeClaim() { return persistentVolumeClaim; } - public void setPersistentVolumeClaim(V1PersistentVolumeClaimVolumeSource persistentVolumeClaim) { this.persistentVolumeClaim = persistentVolumeClaim; } public V1Volume photonPersistentDisk(V1PhotonPersistentDiskVolumeSource photonPersistentDisk) { - this.photonPersistentDisk = photonPersistentDisk; return this; } @@ -659,14 +616,12 @@ public V1PhotonPersistentDiskVolumeSource getPhotonPersistentDisk() { return photonPersistentDisk; } - public void setPhotonPersistentDisk(V1PhotonPersistentDiskVolumeSource photonPersistentDisk) { this.photonPersistentDisk = photonPersistentDisk; } public V1Volume portworxVolume(V1PortworxVolumeSource portworxVolume) { - this.portworxVolume = portworxVolume; return this; } @@ -680,14 +635,12 @@ public V1PortworxVolumeSource getPortworxVolume() { return portworxVolume; } - public void setPortworxVolume(V1PortworxVolumeSource portworxVolume) { this.portworxVolume = portworxVolume; } public V1Volume projected(V1ProjectedVolumeSource projected) { - this.projected = projected; return this; } @@ -701,14 +654,12 @@ public V1ProjectedVolumeSource getProjected() { return projected; } - public void setProjected(V1ProjectedVolumeSource projected) { this.projected = projected; } public V1Volume quobyte(V1QuobyteVolumeSource quobyte) { - this.quobyte = quobyte; return this; } @@ -722,14 +673,12 @@ public V1QuobyteVolumeSource getQuobyte() { return quobyte; } - public void setQuobyte(V1QuobyteVolumeSource quobyte) { this.quobyte = quobyte; } public V1Volume rbd(V1RBDVolumeSource rbd) { - this.rbd = rbd; return this; } @@ -743,14 +692,12 @@ public V1RBDVolumeSource getRbd() { return rbd; } - public void setRbd(V1RBDVolumeSource rbd) { this.rbd = rbd; } public V1Volume scaleIO(V1ScaleIOVolumeSource scaleIO) { - this.scaleIO = scaleIO; return this; } @@ -764,14 +711,12 @@ public V1ScaleIOVolumeSource getScaleIO() { return scaleIO; } - public void setScaleIO(V1ScaleIOVolumeSource scaleIO) { this.scaleIO = scaleIO; } public V1Volume secret(V1SecretVolumeSource secret) { - this.secret = secret; return this; } @@ -785,14 +730,12 @@ public V1SecretVolumeSource getSecret() { return secret; } - public void setSecret(V1SecretVolumeSource secret) { this.secret = secret; } public V1Volume storageos(V1StorageOSVolumeSource storageos) { - this.storageos = storageos; return this; } @@ -806,14 +749,12 @@ public V1StorageOSVolumeSource getStorageos() { return storageos; } - public void setStorageos(V1StorageOSVolumeSource storageos) { this.storageos = storageos; } public V1Volume vsphereVolume(V1VsphereVirtualDiskVolumeSource vsphereVolume) { - this.vsphereVolume = vsphereVolume; return this; } @@ -827,7 +768,6 @@ public V1VsphereVirtualDiskVolumeSource getVsphereVolume() { return vsphereVolume; } - public void setVsphereVolume(V1VsphereVirtualDiskVolumeSource vsphereVolume) { this.vsphereVolume = vsphereVolume; } @@ -973,150 +913,151 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1Volume + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1Volume */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1Volume.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1Volume.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1Volume is not found in the empty JSON string", V1Volume.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1Volume.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1Volume` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1Volume` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1Volume.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `awsElasticBlockStore` if (jsonObj.get("awsElasticBlockStore") != null && !jsonObj.get("awsElasticBlockStore").isJsonNull()) { - V1AWSElasticBlockStoreVolumeSource.validateJsonObject(jsonObj.getAsJsonObject("awsElasticBlockStore")); + V1AWSElasticBlockStoreVolumeSource.validateJsonElement(jsonObj.get("awsElasticBlockStore")); } // validate the optional field `azureDisk` if (jsonObj.get("azureDisk") != null && !jsonObj.get("azureDisk").isJsonNull()) { - V1AzureDiskVolumeSource.validateJsonObject(jsonObj.getAsJsonObject("azureDisk")); + V1AzureDiskVolumeSource.validateJsonElement(jsonObj.get("azureDisk")); } // validate the optional field `azureFile` if (jsonObj.get("azureFile") != null && !jsonObj.get("azureFile").isJsonNull()) { - V1AzureFileVolumeSource.validateJsonObject(jsonObj.getAsJsonObject("azureFile")); + V1AzureFileVolumeSource.validateJsonElement(jsonObj.get("azureFile")); } // validate the optional field `cephfs` if (jsonObj.get("cephfs") != null && !jsonObj.get("cephfs").isJsonNull()) { - V1CephFSVolumeSource.validateJsonObject(jsonObj.getAsJsonObject("cephfs")); + V1CephFSVolumeSource.validateJsonElement(jsonObj.get("cephfs")); } // validate the optional field `cinder` if (jsonObj.get("cinder") != null && !jsonObj.get("cinder").isJsonNull()) { - V1CinderVolumeSource.validateJsonObject(jsonObj.getAsJsonObject("cinder")); + V1CinderVolumeSource.validateJsonElement(jsonObj.get("cinder")); } // validate the optional field `configMap` if (jsonObj.get("configMap") != null && !jsonObj.get("configMap").isJsonNull()) { - V1ConfigMapVolumeSource.validateJsonObject(jsonObj.getAsJsonObject("configMap")); + V1ConfigMapVolumeSource.validateJsonElement(jsonObj.get("configMap")); } // validate the optional field `csi` if (jsonObj.get("csi") != null && !jsonObj.get("csi").isJsonNull()) { - V1CSIVolumeSource.validateJsonObject(jsonObj.getAsJsonObject("csi")); + V1CSIVolumeSource.validateJsonElement(jsonObj.get("csi")); } // validate the optional field `downwardAPI` if (jsonObj.get("downwardAPI") != null && !jsonObj.get("downwardAPI").isJsonNull()) { - V1DownwardAPIVolumeSource.validateJsonObject(jsonObj.getAsJsonObject("downwardAPI")); + V1DownwardAPIVolumeSource.validateJsonElement(jsonObj.get("downwardAPI")); } // validate the optional field `emptyDir` if (jsonObj.get("emptyDir") != null && !jsonObj.get("emptyDir").isJsonNull()) { - V1EmptyDirVolumeSource.validateJsonObject(jsonObj.getAsJsonObject("emptyDir")); + V1EmptyDirVolumeSource.validateJsonElement(jsonObj.get("emptyDir")); } // validate the optional field `ephemeral` if (jsonObj.get("ephemeral") != null && !jsonObj.get("ephemeral").isJsonNull()) { - V1EphemeralVolumeSource.validateJsonObject(jsonObj.getAsJsonObject("ephemeral")); + V1EphemeralVolumeSource.validateJsonElement(jsonObj.get("ephemeral")); } // validate the optional field `fc` if (jsonObj.get("fc") != null && !jsonObj.get("fc").isJsonNull()) { - V1FCVolumeSource.validateJsonObject(jsonObj.getAsJsonObject("fc")); + V1FCVolumeSource.validateJsonElement(jsonObj.get("fc")); } // validate the optional field `flexVolume` if (jsonObj.get("flexVolume") != null && !jsonObj.get("flexVolume").isJsonNull()) { - V1FlexVolumeSource.validateJsonObject(jsonObj.getAsJsonObject("flexVolume")); + V1FlexVolumeSource.validateJsonElement(jsonObj.get("flexVolume")); } // validate the optional field `flocker` if (jsonObj.get("flocker") != null && !jsonObj.get("flocker").isJsonNull()) { - V1FlockerVolumeSource.validateJsonObject(jsonObj.getAsJsonObject("flocker")); + V1FlockerVolumeSource.validateJsonElement(jsonObj.get("flocker")); } // validate the optional field `gcePersistentDisk` if (jsonObj.get("gcePersistentDisk") != null && !jsonObj.get("gcePersistentDisk").isJsonNull()) { - V1GCEPersistentDiskVolumeSource.validateJsonObject(jsonObj.getAsJsonObject("gcePersistentDisk")); + V1GCEPersistentDiskVolumeSource.validateJsonElement(jsonObj.get("gcePersistentDisk")); } // validate the optional field `gitRepo` if (jsonObj.get("gitRepo") != null && !jsonObj.get("gitRepo").isJsonNull()) { - V1GitRepoVolumeSource.validateJsonObject(jsonObj.getAsJsonObject("gitRepo")); + V1GitRepoVolumeSource.validateJsonElement(jsonObj.get("gitRepo")); } // validate the optional field `glusterfs` if (jsonObj.get("glusterfs") != null && !jsonObj.get("glusterfs").isJsonNull()) { - V1GlusterfsVolumeSource.validateJsonObject(jsonObj.getAsJsonObject("glusterfs")); + V1GlusterfsVolumeSource.validateJsonElement(jsonObj.get("glusterfs")); } // validate the optional field `hostPath` if (jsonObj.get("hostPath") != null && !jsonObj.get("hostPath").isJsonNull()) { - V1HostPathVolumeSource.validateJsonObject(jsonObj.getAsJsonObject("hostPath")); + V1HostPathVolumeSource.validateJsonElement(jsonObj.get("hostPath")); } // validate the optional field `iscsi` if (jsonObj.get("iscsi") != null && !jsonObj.get("iscsi").isJsonNull()) { - V1ISCSIVolumeSource.validateJsonObject(jsonObj.getAsJsonObject("iscsi")); + V1ISCSIVolumeSource.validateJsonElement(jsonObj.get("iscsi")); } if (!jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } // validate the optional field `nfs` if (jsonObj.get("nfs") != null && !jsonObj.get("nfs").isJsonNull()) { - V1NFSVolumeSource.validateJsonObject(jsonObj.getAsJsonObject("nfs")); + V1NFSVolumeSource.validateJsonElement(jsonObj.get("nfs")); } // validate the optional field `persistentVolumeClaim` if (jsonObj.get("persistentVolumeClaim") != null && !jsonObj.get("persistentVolumeClaim").isJsonNull()) { - V1PersistentVolumeClaimVolumeSource.validateJsonObject(jsonObj.getAsJsonObject("persistentVolumeClaim")); + V1PersistentVolumeClaimVolumeSource.validateJsonElement(jsonObj.get("persistentVolumeClaim")); } // validate the optional field `photonPersistentDisk` if (jsonObj.get("photonPersistentDisk") != null && !jsonObj.get("photonPersistentDisk").isJsonNull()) { - V1PhotonPersistentDiskVolumeSource.validateJsonObject(jsonObj.getAsJsonObject("photonPersistentDisk")); + V1PhotonPersistentDiskVolumeSource.validateJsonElement(jsonObj.get("photonPersistentDisk")); } // validate the optional field `portworxVolume` if (jsonObj.get("portworxVolume") != null && !jsonObj.get("portworxVolume").isJsonNull()) { - V1PortworxVolumeSource.validateJsonObject(jsonObj.getAsJsonObject("portworxVolume")); + V1PortworxVolumeSource.validateJsonElement(jsonObj.get("portworxVolume")); } // validate the optional field `projected` if (jsonObj.get("projected") != null && !jsonObj.get("projected").isJsonNull()) { - V1ProjectedVolumeSource.validateJsonObject(jsonObj.getAsJsonObject("projected")); + V1ProjectedVolumeSource.validateJsonElement(jsonObj.get("projected")); } // validate the optional field `quobyte` if (jsonObj.get("quobyte") != null && !jsonObj.get("quobyte").isJsonNull()) { - V1QuobyteVolumeSource.validateJsonObject(jsonObj.getAsJsonObject("quobyte")); + V1QuobyteVolumeSource.validateJsonElement(jsonObj.get("quobyte")); } // validate the optional field `rbd` if (jsonObj.get("rbd") != null && !jsonObj.get("rbd").isJsonNull()) { - V1RBDVolumeSource.validateJsonObject(jsonObj.getAsJsonObject("rbd")); + V1RBDVolumeSource.validateJsonElement(jsonObj.get("rbd")); } // validate the optional field `scaleIO` if (jsonObj.get("scaleIO") != null && !jsonObj.get("scaleIO").isJsonNull()) { - V1ScaleIOVolumeSource.validateJsonObject(jsonObj.getAsJsonObject("scaleIO")); + V1ScaleIOVolumeSource.validateJsonElement(jsonObj.get("scaleIO")); } // validate the optional field `secret` if (jsonObj.get("secret") != null && !jsonObj.get("secret").isJsonNull()) { - V1SecretVolumeSource.validateJsonObject(jsonObj.getAsJsonObject("secret")); + V1SecretVolumeSource.validateJsonElement(jsonObj.get("secret")); } // validate the optional field `storageos` if (jsonObj.get("storageos") != null && !jsonObj.get("storageos").isJsonNull()) { - V1StorageOSVolumeSource.validateJsonObject(jsonObj.getAsJsonObject("storageos")); + V1StorageOSVolumeSource.validateJsonElement(jsonObj.get("storageos")); } // validate the optional field `vsphereVolume` if (jsonObj.get("vsphereVolume") != null && !jsonObj.get("vsphereVolume").isJsonNull()) { - V1VsphereVirtualDiskVolumeSource.validateJsonObject(jsonObj.getAsJsonObject("vsphereVolume")); + V1VsphereVirtualDiskVolumeSource.validateJsonElement(jsonObj.get("vsphereVolume")); } } @@ -1140,9 +1081,9 @@ public void write(JsonWriter out, V1Volume value) throws IOException { @Override public V1Volume read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -1169,3 +1110,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1VolumeAttachment.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1VolumeAttachment.java index 94eec8cebd..5e798aec6f 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1VolumeAttachment.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1VolumeAttachment.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1VolumeAttachmentSpec; import io.kubernetes.client.openapi.models.V1VolumeAttachmentStatus; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * VolumeAttachment captures the intent to attach or detach the specified volume to/from the specified node. VolumeAttachment objects are non-namespaced. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1VolumeAttachment implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -78,7 +78,6 @@ public V1VolumeAttachment() { } public V1VolumeAttachment apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -92,14 +91,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1VolumeAttachment kind(String kind) { - this.kind = kind; return this; } @@ -113,14 +110,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1VolumeAttachment metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -134,14 +129,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V1VolumeAttachment spec(V1VolumeAttachmentSpec spec) { - this.spec = spec; return this; } @@ -155,14 +148,12 @@ public V1VolumeAttachmentSpec getSpec() { return spec; } - public void setSpec(V1VolumeAttachmentSpec spec) { this.spec = spec; } public V1VolumeAttachment status(V1VolumeAttachmentStatus status) { - this.status = status; return this; } @@ -176,7 +167,6 @@ public V1VolumeAttachmentStatus getStatus() { return status; } - public void setStatus(V1VolumeAttachmentStatus status) { this.status = status; } @@ -247,32 +237,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1VolumeAttachment + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1VolumeAttachment */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1VolumeAttachment.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1VolumeAttachment.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1VolumeAttachment is not found in the empty JSON string", V1VolumeAttachment.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1VolumeAttachment.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1VolumeAttachment` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1VolumeAttachment` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1VolumeAttachment.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -281,13 +272,13 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } // validate the required field `spec` - V1VolumeAttachmentSpec.validateJsonObject(jsonObj.getAsJsonObject("spec")); + V1VolumeAttachmentSpec.validateJsonElement(jsonObj.get("spec")); // validate the optional field `status` if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { - V1VolumeAttachmentStatus.validateJsonObject(jsonObj.getAsJsonObject("status")); + V1VolumeAttachmentStatus.validateJsonElement(jsonObj.get("status")); } } @@ -311,9 +302,9 @@ public void write(JsonWriter out, V1VolumeAttachment value) throws IOException { @Override public V1VolumeAttachment read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -340,3 +331,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1VolumeAttachmentList.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1VolumeAttachmentList.java index 6e40ffd24e..98944c37cb 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1VolumeAttachmentList.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1VolumeAttachmentList.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1VolumeAttachment; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * VolumeAttachmentList is a collection of VolumeAttachment objects. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1VolumeAttachmentList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -75,7 +75,6 @@ public V1VolumeAttachmentList() { } public V1VolumeAttachmentList apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -89,14 +88,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1VolumeAttachmentList items(List items) { - this.items = items; return this; } @@ -118,14 +115,12 @@ public List getItems() { return items; } - public void setItems(List items) { this.items = items; } public V1VolumeAttachmentList kind(String kind) { - this.kind = kind; return this; } @@ -139,14 +134,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1VolumeAttachmentList metadata(V1ListMeta metadata) { - this.metadata = metadata; return this; } @@ -160,7 +153,6 @@ public V1ListMeta getMetadata() { return metadata; } - public void setMetadata(V1ListMeta metadata) { this.metadata = metadata; } @@ -228,32 +220,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1VolumeAttachmentList + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1VolumeAttachmentList */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1VolumeAttachmentList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1VolumeAttachmentList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1VolumeAttachmentList is not found in the empty JSON string", V1VolumeAttachmentList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1VolumeAttachmentList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1VolumeAttachmentList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1VolumeAttachmentList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1VolumeAttachmentList.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -265,14 +258,14 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); // validate the required field `items` (array) for (int i = 0; i < jsonArrayitems.size(); i++) { - V1VolumeAttachment.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject()); + V1VolumeAttachment.validateJsonElement(jsonArrayitems.get(i)); }; if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ListMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ListMeta.validateJsonElement(jsonObj.get("metadata")); } } @@ -296,9 +289,9 @@ public void write(JsonWriter out, V1VolumeAttachmentList value) throws IOExcepti @Override public V1VolumeAttachmentList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -325,3 +318,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1VolumeAttachmentSource.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1VolumeAttachmentSource.java index f7b96a2d90..6cd77d6c44 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1VolumeAttachmentSource.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1VolumeAttachmentSource.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.openapi.models.V1PersistentVolumeSpec; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * VolumeAttachmentSource represents a volume that should be attached. Right now only PersistenVolumes can be attached via external attacher, in future we may allow also inline volumes in pods. Exactly one member can be set. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1VolumeAttachmentSource { public static final String SERIALIZED_NAME_INLINE_VOLUME_SPEC = "inlineVolumeSpec"; @SerializedName(SERIALIZED_NAME_INLINE_VOLUME_SPEC) @@ -64,7 +64,6 @@ public V1VolumeAttachmentSource() { } public V1VolumeAttachmentSource inlineVolumeSpec(V1PersistentVolumeSpec inlineVolumeSpec) { - this.inlineVolumeSpec = inlineVolumeSpec; return this; } @@ -78,14 +77,12 @@ public V1PersistentVolumeSpec getInlineVolumeSpec() { return inlineVolumeSpec; } - public void setInlineVolumeSpec(V1PersistentVolumeSpec inlineVolumeSpec) { this.inlineVolumeSpec = inlineVolumeSpec; } public V1VolumeAttachmentSource persistentVolumeName(String persistentVolumeName) { - this.persistentVolumeName = persistentVolumeName; return this; } @@ -99,7 +96,6 @@ public String getPersistentVolumeName() { return persistentVolumeName; } - public void setPersistentVolumeName(String persistentVolumeName) { this.persistentVolumeName = persistentVolumeName; } @@ -160,28 +156,29 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1VolumeAttachmentSource + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1VolumeAttachmentSource */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1VolumeAttachmentSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1VolumeAttachmentSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1VolumeAttachmentSource is not found in the empty JSON string", V1VolumeAttachmentSource.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1VolumeAttachmentSource.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1VolumeAttachmentSource` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1VolumeAttachmentSource` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `inlineVolumeSpec` if (jsonObj.get("inlineVolumeSpec") != null && !jsonObj.get("inlineVolumeSpec").isJsonNull()) { - V1PersistentVolumeSpec.validateJsonObject(jsonObj.getAsJsonObject("inlineVolumeSpec")); + V1PersistentVolumeSpec.validateJsonElement(jsonObj.get("inlineVolumeSpec")); } if ((jsonObj.get("persistentVolumeName") != null && !jsonObj.get("persistentVolumeName").isJsonNull()) && !jsonObj.get("persistentVolumeName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `persistentVolumeName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("persistentVolumeName").toString())); @@ -208,9 +205,9 @@ public void write(JsonWriter out, V1VolumeAttachmentSource value) throws IOExcep @Override public V1VolumeAttachmentSource read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -237,3 +234,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1VolumeAttachmentSpec.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1VolumeAttachmentSpec.java index 92ff9a0982..66cb60dc97 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1VolumeAttachmentSpec.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1VolumeAttachmentSpec.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.openapi.models.V1VolumeAttachmentSource; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * VolumeAttachmentSpec is the specification of a VolumeAttachment request. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1VolumeAttachmentSpec { public static final String SERIALIZED_NAME_ATTACHER = "attacher"; @SerializedName(SERIALIZED_NAME_ATTACHER) @@ -68,7 +68,6 @@ public V1VolumeAttachmentSpec() { } public V1VolumeAttachmentSpec attacher(String attacher) { - this.attacher = attacher; return this; } @@ -82,14 +81,12 @@ public String getAttacher() { return attacher; } - public void setAttacher(String attacher) { this.attacher = attacher; } public V1VolumeAttachmentSpec nodeName(String nodeName) { - this.nodeName = nodeName; return this; } @@ -103,14 +100,12 @@ public String getNodeName() { return nodeName; } - public void setNodeName(String nodeName) { this.nodeName = nodeName; } public V1VolumeAttachmentSpec source(V1VolumeAttachmentSource source) { - this.source = source; return this; } @@ -124,7 +119,6 @@ public V1VolumeAttachmentSource getSource() { return source; } - public void setSource(V1VolumeAttachmentSource source) { this.source = source; } @@ -191,32 +185,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1VolumeAttachmentSpec + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1VolumeAttachmentSpec */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1VolumeAttachmentSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1VolumeAttachmentSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1VolumeAttachmentSpec is not found in the empty JSON string", V1VolumeAttachmentSpec.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1VolumeAttachmentSpec.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1VolumeAttachmentSpec` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1VolumeAttachmentSpec` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1VolumeAttachmentSpec.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("attacher").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `attacher` to be a primitive type in the JSON string but got `%s`", jsonObj.get("attacher").toString())); } @@ -224,7 +219,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("Expected the field `nodeName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nodeName").toString())); } // validate the required field `source` - V1VolumeAttachmentSource.validateJsonObject(jsonObj.getAsJsonObject("source")); + V1VolumeAttachmentSource.validateJsonElement(jsonObj.get("source")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -247,9 +242,9 @@ public void write(JsonWriter out, V1VolumeAttachmentSpec value) throws IOExcepti @Override public V1VolumeAttachmentSpec read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -276,3 +271,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1VolumeAttachmentStatus.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1VolumeAttachmentStatus.java index f5569ce561..316d964286 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1VolumeAttachmentStatus.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1VolumeAttachmentStatus.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.openapi.models.V1VolumeError; import java.io.IOException; +import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * VolumeAttachmentStatus is the status of a VolumeAttachment request. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1VolumeAttachmentStatus { public static final String SERIALIZED_NAME_ATTACH_ERROR = "attachError"; @SerializedName(SERIALIZED_NAME_ATTACH_ERROR) @@ -74,7 +74,6 @@ public V1VolumeAttachmentStatus() { } public V1VolumeAttachmentStatus attachError(V1VolumeError attachError) { - this.attachError = attachError; return this; } @@ -88,14 +87,12 @@ public V1VolumeError getAttachError() { return attachError; } - public void setAttachError(V1VolumeError attachError) { this.attachError = attachError; } public V1VolumeAttachmentStatus attached(Boolean attached) { - this.attached = attached; return this; } @@ -109,14 +106,12 @@ public Boolean getAttached() { return attached; } - public void setAttached(Boolean attached) { this.attached = attached; } public V1VolumeAttachmentStatus attachmentMetadata(Map attachmentMetadata) { - this.attachmentMetadata = attachmentMetadata; return this; } @@ -138,14 +133,12 @@ public Map getAttachmentMetadata() { return attachmentMetadata; } - public void setAttachmentMetadata(Map attachmentMetadata) { this.attachmentMetadata = attachmentMetadata; } public V1VolumeAttachmentStatus detachError(V1VolumeError detachError) { - this.detachError = detachError; return this; } @@ -159,7 +152,6 @@ public V1VolumeError getDetachError() { return detachError; } - public void setDetachError(V1VolumeError detachError) { this.detachError = detachError; } @@ -227,39 +219,40 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1VolumeAttachmentStatus + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1VolumeAttachmentStatus */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1VolumeAttachmentStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1VolumeAttachmentStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1VolumeAttachmentStatus is not found in the empty JSON string", V1VolumeAttachmentStatus.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1VolumeAttachmentStatus.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1VolumeAttachmentStatus` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1VolumeAttachmentStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1VolumeAttachmentStatus.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `attachError` if (jsonObj.get("attachError") != null && !jsonObj.get("attachError").isJsonNull()) { - V1VolumeError.validateJsonObject(jsonObj.getAsJsonObject("attachError")); + V1VolumeError.validateJsonElement(jsonObj.get("attachError")); } // validate the optional field `detachError` if (jsonObj.get("detachError") != null && !jsonObj.get("detachError").isJsonNull()) { - V1VolumeError.validateJsonObject(jsonObj.getAsJsonObject("detachError")); + V1VolumeError.validateJsonElement(jsonObj.get("detachError")); } } @@ -283,9 +276,9 @@ public void write(JsonWriter out, V1VolumeAttachmentStatus value) throws IOExcep @Override public V1VolumeAttachmentStatus read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -312,3 +305,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1VolumeDevice.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1VolumeDevice.java index 30636aa06b..7cf1f8e4c6 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1VolumeDevice.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1VolumeDevice.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * volumeDevice describes a mapping of a raw block device within a container. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1VolumeDevice { public static final String SERIALIZED_NAME_DEVICE_PATH = "devicePath"; @SerializedName(SERIALIZED_NAME_DEVICE_PATH) @@ -63,7 +63,6 @@ public V1VolumeDevice() { } public V1VolumeDevice devicePath(String devicePath) { - this.devicePath = devicePath; return this; } @@ -77,14 +76,12 @@ public String getDevicePath() { return devicePath; } - public void setDevicePath(String devicePath) { this.devicePath = devicePath; } public V1VolumeDevice name(String name) { - this.name = name; return this; } @@ -98,7 +95,6 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } @@ -161,32 +157,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1VolumeDevice + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1VolumeDevice */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1VolumeDevice.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1VolumeDevice.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1VolumeDevice is not found in the empty JSON string", V1VolumeDevice.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1VolumeDevice.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1VolumeDevice` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1VolumeDevice` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1VolumeDevice.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("devicePath").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `devicePath` to be a primitive type in the JSON string but got `%s`", jsonObj.get("devicePath").toString())); } @@ -215,9 +212,9 @@ public void write(JsonWriter out, V1VolumeDevice value) throws IOException { @Override public V1VolumeDevice read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -244,3 +241,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1VolumeError.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1VolumeError.java index a4094e0a5a..75ffc572f6 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1VolumeError.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1VolumeError.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * VolumeError captures an error encountered during a volume operation. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1VolumeError { public static final String SERIALIZED_NAME_MESSAGE = "message"; @SerializedName(SERIALIZED_NAME_MESSAGE) @@ -64,7 +64,6 @@ public V1VolumeError() { } public V1VolumeError message(String message) { - this.message = message; return this; } @@ -78,14 +77,12 @@ public String getMessage() { return message; } - public void setMessage(String message) { this.message = message; } public V1VolumeError time(OffsetDateTime time) { - this.time = time; return this; } @@ -99,7 +96,6 @@ public OffsetDateTime getTime() { return time; } - public void setTime(OffsetDateTime time) { this.time = time; } @@ -160,25 +156,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1VolumeError + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1VolumeError */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1VolumeError.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1VolumeError.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1VolumeError is not found in the empty JSON string", V1VolumeError.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1VolumeError.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1VolumeError` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1VolumeError` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); } @@ -204,9 +201,9 @@ public void write(JsonWriter out, V1VolumeError value) throws IOException { @Override public V1VolumeError read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -233,3 +230,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1VolumeMount.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1VolumeMount.java index 1f15babcdf..55f5d5564c 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1VolumeMount.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1VolumeMount.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * VolumeMount describes a mounting of a Volume within a container. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1VolumeMount { public static final String SERIALIZED_NAME_MOUNT_PATH = "mountPath"; @SerializedName(SERIALIZED_NAME_MOUNT_PATH) @@ -83,7 +83,6 @@ public V1VolumeMount() { } public V1VolumeMount mountPath(String mountPath) { - this.mountPath = mountPath; return this; } @@ -97,14 +96,12 @@ public String getMountPath() { return mountPath; } - public void setMountPath(String mountPath) { this.mountPath = mountPath; } public V1VolumeMount mountPropagation(String mountPropagation) { - this.mountPropagation = mountPropagation; return this; } @@ -118,14 +115,12 @@ public String getMountPropagation() { return mountPropagation; } - public void setMountPropagation(String mountPropagation) { this.mountPropagation = mountPropagation; } public V1VolumeMount name(String name) { - this.name = name; return this; } @@ -139,14 +134,12 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } public V1VolumeMount readOnly(Boolean readOnly) { - this.readOnly = readOnly; return this; } @@ -160,14 +153,12 @@ public Boolean getReadOnly() { return readOnly; } - public void setReadOnly(Boolean readOnly) { this.readOnly = readOnly; } public V1VolumeMount recursiveReadOnly(String recursiveReadOnly) { - this.recursiveReadOnly = recursiveReadOnly; return this; } @@ -181,14 +172,12 @@ public String getRecursiveReadOnly() { return recursiveReadOnly; } - public void setRecursiveReadOnly(String recursiveReadOnly) { this.recursiveReadOnly = recursiveReadOnly; } public V1VolumeMount subPath(String subPath) { - this.subPath = subPath; return this; } @@ -202,14 +191,12 @@ public String getSubPath() { return subPath; } - public void setSubPath(String subPath) { this.subPath = subPath; } public V1VolumeMount subPathExpr(String subPathExpr) { - this.subPathExpr = subPathExpr; return this; } @@ -223,7 +210,6 @@ public String getSubPathExpr() { return subPathExpr; } - public void setSubPathExpr(String subPathExpr) { this.subPathExpr = subPathExpr; } @@ -301,32 +287,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1VolumeMount + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1VolumeMount */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1VolumeMount.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1VolumeMount.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1VolumeMount is not found in the empty JSON string", V1VolumeMount.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1VolumeMount.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1VolumeMount` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1VolumeMount` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1VolumeMount.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("mountPath").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `mountPath` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mountPath").toString())); } @@ -367,9 +354,9 @@ public void write(JsonWriter out, V1VolumeMount value) throws IOException { @Override public V1VolumeMount read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -396,3 +383,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1VolumeMountStatus.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1VolumeMountStatus.java index 734055be2f..556df7d927 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1VolumeMountStatus.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1VolumeMountStatus.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * VolumeMountStatus shows status of volume mounts. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1VolumeMountStatus { public static final String SERIALIZED_NAME_MOUNT_PATH = "mountPath"; @SerializedName(SERIALIZED_NAME_MOUNT_PATH) @@ -71,7 +71,6 @@ public V1VolumeMountStatus() { } public V1VolumeMountStatus mountPath(String mountPath) { - this.mountPath = mountPath; return this; } @@ -85,14 +84,12 @@ public String getMountPath() { return mountPath; } - public void setMountPath(String mountPath) { this.mountPath = mountPath; } public V1VolumeMountStatus name(String name) { - this.name = name; return this; } @@ -106,14 +103,12 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } public V1VolumeMountStatus readOnly(Boolean readOnly) { - this.readOnly = readOnly; return this; } @@ -127,14 +122,12 @@ public Boolean getReadOnly() { return readOnly; } - public void setReadOnly(Boolean readOnly) { this.readOnly = readOnly; } public V1VolumeMountStatus recursiveReadOnly(String recursiveReadOnly) { - this.recursiveReadOnly = recursiveReadOnly; return this; } @@ -148,7 +141,6 @@ public String getRecursiveReadOnly() { return recursiveReadOnly; } - public void setRecursiveReadOnly(String recursiveReadOnly) { this.recursiveReadOnly = recursiveReadOnly; } @@ -217,32 +209,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1VolumeMountStatus + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1VolumeMountStatus */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1VolumeMountStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1VolumeMountStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1VolumeMountStatus is not found in the empty JSON string", V1VolumeMountStatus.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1VolumeMountStatus.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1VolumeMountStatus` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1VolumeMountStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1VolumeMountStatus.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("mountPath").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `mountPath` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mountPath").toString())); } @@ -274,9 +267,9 @@ public void write(JsonWriter out, V1VolumeMountStatus value) throws IOException @Override public V1VolumeMountStatus read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -303,3 +296,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1VolumeNodeAffinity.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1VolumeNodeAffinity.java index ca48f1e89d..760a1a75d5 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1VolumeNodeAffinity.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1VolumeNodeAffinity.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.openapi.models.V1NodeSelector; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * VolumeNodeAffinity defines constraints that limit what nodes this volume can be accessed from. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1VolumeNodeAffinity { public static final String SERIALIZED_NAME_REQUIRED = "required"; @SerializedName(SERIALIZED_NAME_REQUIRED) @@ -60,7 +60,6 @@ public V1VolumeNodeAffinity() { } public V1VolumeNodeAffinity required(V1NodeSelector required) { - this.required = required; return this; } @@ -74,7 +73,6 @@ public V1NodeSelector getRequired() { return required; } - public void setRequired(V1NodeSelector required) { this.required = required; } @@ -132,28 +130,29 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1VolumeNodeAffinity + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1VolumeNodeAffinity */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1VolumeNodeAffinity.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1VolumeNodeAffinity.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1VolumeNodeAffinity is not found in the empty JSON string", V1VolumeNodeAffinity.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1VolumeNodeAffinity.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1VolumeNodeAffinity` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1VolumeNodeAffinity` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `required` if (jsonObj.get("required") != null && !jsonObj.get("required").isJsonNull()) { - V1NodeSelector.validateJsonObject(jsonObj.getAsJsonObject("required")); + V1NodeSelector.validateJsonElement(jsonObj.get("required")); } } @@ -177,9 +176,9 @@ public void write(JsonWriter out, V1VolumeNodeAffinity value) throws IOException @Override public V1VolumeNodeAffinity read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -206,3 +205,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1VolumeNodeResources.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1VolumeNodeResources.java index 80f33c1b41..63ca7f78f1 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1VolumeNodeResources.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1VolumeNodeResources.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * VolumeNodeResources is a set of resource limits for scheduling of volumes. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1VolumeNodeResources { public static final String SERIALIZED_NAME_COUNT = "count"; @SerializedName(SERIALIZED_NAME_COUNT) @@ -59,7 +59,6 @@ public V1VolumeNodeResources() { } public V1VolumeNodeResources count(Integer count) { - this.count = count; return this; } @@ -73,7 +72,6 @@ public Integer getCount() { return count; } - public void setCount(Integer count) { this.count = count; } @@ -131,25 +129,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1VolumeNodeResources + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1VolumeNodeResources */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1VolumeNodeResources.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1VolumeNodeResources.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1VolumeNodeResources is not found in the empty JSON string", V1VolumeNodeResources.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1VolumeNodeResources.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1VolumeNodeResources` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1VolumeNodeResources` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -172,9 +171,9 @@ public void write(JsonWriter out, V1VolumeNodeResources value) throws IOExceptio @Override public V1VolumeNodeResources read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -201,3 +200,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1VolumeProjection.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1VolumeProjection.java index f4d3a904b9..6762a47b2f 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1VolumeProjection.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1VolumeProjection.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -25,6 +25,7 @@ import io.kubernetes.client.openapi.models.V1SecretProjection; import io.kubernetes.client.openapi.models.V1ServiceAccountTokenProjection; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -46,7 +47,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -54,7 +54,7 @@ /** * Projection that may be projected along with other supported volume types */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1VolumeProjection { public static final String SERIALIZED_NAME_CLUSTER_TRUST_BUNDLE = "clusterTrustBundle"; @SerializedName(SERIALIZED_NAME_CLUSTER_TRUST_BUNDLE) @@ -80,7 +80,6 @@ public V1VolumeProjection() { } public V1VolumeProjection clusterTrustBundle(V1ClusterTrustBundleProjection clusterTrustBundle) { - this.clusterTrustBundle = clusterTrustBundle; return this; } @@ -94,14 +93,12 @@ public V1ClusterTrustBundleProjection getClusterTrustBundle() { return clusterTrustBundle; } - public void setClusterTrustBundle(V1ClusterTrustBundleProjection clusterTrustBundle) { this.clusterTrustBundle = clusterTrustBundle; } public V1VolumeProjection configMap(V1ConfigMapProjection configMap) { - this.configMap = configMap; return this; } @@ -115,14 +112,12 @@ public V1ConfigMapProjection getConfigMap() { return configMap; } - public void setConfigMap(V1ConfigMapProjection configMap) { this.configMap = configMap; } public V1VolumeProjection downwardAPI(V1DownwardAPIProjection downwardAPI) { - this.downwardAPI = downwardAPI; return this; } @@ -136,14 +131,12 @@ public V1DownwardAPIProjection getDownwardAPI() { return downwardAPI; } - public void setDownwardAPI(V1DownwardAPIProjection downwardAPI) { this.downwardAPI = downwardAPI; } public V1VolumeProjection secret(V1SecretProjection secret) { - this.secret = secret; return this; } @@ -157,14 +150,12 @@ public V1SecretProjection getSecret() { return secret; } - public void setSecret(V1SecretProjection secret) { this.secret = secret; } public V1VolumeProjection serviceAccountToken(V1ServiceAccountTokenProjection serviceAccountToken) { - this.serviceAccountToken = serviceAccountToken; return this; } @@ -178,7 +169,6 @@ public V1ServiceAccountTokenProjection getServiceAccountToken() { return serviceAccountToken; } - public void setServiceAccountToken(V1ServiceAccountTokenProjection serviceAccountToken) { this.serviceAccountToken = serviceAccountToken; } @@ -248,44 +238,45 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1VolumeProjection + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1VolumeProjection */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1VolumeProjection.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1VolumeProjection.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1VolumeProjection is not found in the empty JSON string", V1VolumeProjection.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1VolumeProjection.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1VolumeProjection` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1VolumeProjection` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `clusterTrustBundle` if (jsonObj.get("clusterTrustBundle") != null && !jsonObj.get("clusterTrustBundle").isJsonNull()) { - V1ClusterTrustBundleProjection.validateJsonObject(jsonObj.getAsJsonObject("clusterTrustBundle")); + V1ClusterTrustBundleProjection.validateJsonElement(jsonObj.get("clusterTrustBundle")); } // validate the optional field `configMap` if (jsonObj.get("configMap") != null && !jsonObj.get("configMap").isJsonNull()) { - V1ConfigMapProjection.validateJsonObject(jsonObj.getAsJsonObject("configMap")); + V1ConfigMapProjection.validateJsonElement(jsonObj.get("configMap")); } // validate the optional field `downwardAPI` if (jsonObj.get("downwardAPI") != null && !jsonObj.get("downwardAPI").isJsonNull()) { - V1DownwardAPIProjection.validateJsonObject(jsonObj.getAsJsonObject("downwardAPI")); + V1DownwardAPIProjection.validateJsonElement(jsonObj.get("downwardAPI")); } // validate the optional field `secret` if (jsonObj.get("secret") != null && !jsonObj.get("secret").isJsonNull()) { - V1SecretProjection.validateJsonObject(jsonObj.getAsJsonObject("secret")); + V1SecretProjection.validateJsonElement(jsonObj.get("secret")); } // validate the optional field `serviceAccountToken` if (jsonObj.get("serviceAccountToken") != null && !jsonObj.get("serviceAccountToken").isJsonNull()) { - V1ServiceAccountTokenProjection.validateJsonObject(jsonObj.getAsJsonObject("serviceAccountToken")); + V1ServiceAccountTokenProjection.validateJsonElement(jsonObj.get("serviceAccountToken")); } } @@ -309,9 +300,9 @@ public void write(JsonWriter out, V1VolumeProjection value) throws IOException { @Override public V1VolumeProjection read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -338,3 +329,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1VolumeResourceRequirements.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1VolumeResourceRequirements.java index 8e88468985..24ab0836ea 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1VolumeResourceRequirements.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1VolumeResourceRequirements.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.custom.Quantity; import java.io.IOException; +import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * VolumeResourceRequirements describes the storage resource requirements for a volume. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1VolumeResourceRequirements { public static final String SERIALIZED_NAME_LIMITS = "limits"; @SerializedName(SERIALIZED_NAME_LIMITS) @@ -66,7 +66,6 @@ public V1VolumeResourceRequirements() { } public V1VolumeResourceRequirements limits(Map limits) { - this.limits = limits; return this; } @@ -88,14 +87,12 @@ public Map getLimits() { return limits; } - public void setLimits(Map limits) { this.limits = limits; } public V1VolumeResourceRequirements requests(Map requests) { - this.requests = requests; return this; } @@ -117,7 +114,6 @@ public Map getRequests() { return requests; } - public void setRequests(Map requests) { this.requests = requests; } @@ -178,25 +174,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1VolumeResourceRequirements + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1VolumeResourceRequirements */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1VolumeResourceRequirements.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1VolumeResourceRequirements.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1VolumeResourceRequirements is not found in the empty JSON string", V1VolumeResourceRequirements.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1VolumeResourceRequirements.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1VolumeResourceRequirements` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1VolumeResourceRequirements` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -219,9 +216,9 @@ public void write(JsonWriter out, V1VolumeResourceRequirements value) throws IOE @Override public V1VolumeResourceRequirements read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -248,3 +245,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1VsphereVirtualDiskVolumeSource.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1VsphereVirtualDiskVolumeSource.java index 1b3b3a79cd..1155e3a98b 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1VsphereVirtualDiskVolumeSource.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1VsphereVirtualDiskVolumeSource.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * Represents a vSphere volume resource. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1VsphereVirtualDiskVolumeSource { public static final String SERIALIZED_NAME_FS_TYPE = "fsType"; @SerializedName(SERIALIZED_NAME_FS_TYPE) @@ -71,7 +71,6 @@ public V1VsphereVirtualDiskVolumeSource() { } public V1VsphereVirtualDiskVolumeSource fsType(String fsType) { - this.fsType = fsType; return this; } @@ -85,14 +84,12 @@ public String getFsType() { return fsType; } - public void setFsType(String fsType) { this.fsType = fsType; } public V1VsphereVirtualDiskVolumeSource storagePolicyID(String storagePolicyID) { - this.storagePolicyID = storagePolicyID; return this; } @@ -106,14 +103,12 @@ public String getStoragePolicyID() { return storagePolicyID; } - public void setStoragePolicyID(String storagePolicyID) { this.storagePolicyID = storagePolicyID; } public V1VsphereVirtualDiskVolumeSource storagePolicyName(String storagePolicyName) { - this.storagePolicyName = storagePolicyName; return this; } @@ -127,14 +122,12 @@ public String getStoragePolicyName() { return storagePolicyName; } - public void setStoragePolicyName(String storagePolicyName) { this.storagePolicyName = storagePolicyName; } public V1VsphereVirtualDiskVolumeSource volumePath(String volumePath) { - this.volumePath = volumePath; return this; } @@ -148,7 +141,6 @@ public String getVolumePath() { return volumePath; } - public void setVolumePath(String volumePath) { this.volumePath = volumePath; } @@ -216,32 +208,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1VsphereVirtualDiskVolumeSource + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1VsphereVirtualDiskVolumeSource */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1VsphereVirtualDiskVolumeSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1VsphereVirtualDiskVolumeSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1VsphereVirtualDiskVolumeSource is not found in the empty JSON string", V1VsphereVirtualDiskVolumeSource.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1VsphereVirtualDiskVolumeSource.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1VsphereVirtualDiskVolumeSource` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1VsphereVirtualDiskVolumeSource` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1VsphereVirtualDiskVolumeSource.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("fsType") != null && !jsonObj.get("fsType").isJsonNull()) && !jsonObj.get("fsType").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `fsType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fsType").toString())); } @@ -276,9 +269,9 @@ public void write(JsonWriter out, V1VsphereVirtualDiskVolumeSource value) throws @Override public V1VsphereVirtualDiskVolumeSource read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -305,3 +298,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1WatchEvent.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1WatchEvent.java index 955a8cc88c..be529fc461 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1WatchEvent.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1WatchEvent.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * Event represents a single event to a watched resource. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1WatchEvent { public static final String SERIALIZED_NAME_OBJECT = "object"; @SerializedName(SERIALIZED_NAME_OBJECT) @@ -63,7 +63,6 @@ public V1WatchEvent() { } public V1WatchEvent _object(Object _object) { - this._object = _object; return this; } @@ -77,14 +76,12 @@ public Object getObject() { return _object; } - public void setObject(Object _object) { this._object = _object; } public V1WatchEvent type(String type) { - this.type = type; return this; } @@ -98,7 +95,6 @@ public String getType() { return type; } - public void setType(String type) { this.type = type; } @@ -161,32 +157,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1WatchEvent + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1WatchEvent */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1WatchEvent.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1WatchEvent.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1WatchEvent is not found in the empty JSON string", V1WatchEvent.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1WatchEvent.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1WatchEvent` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1WatchEvent` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1WatchEvent.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } @@ -212,9 +209,9 @@ public void write(JsonWriter out, V1WatchEvent value) throws IOException { @Override public V1WatchEvent read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -241,3 +238,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1WebhookConversion.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1WebhookConversion.java index 2df3fd0555..5f015d1729 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1WebhookConversion.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1WebhookConversion.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.ApiextensionsV1WebhookClientConfig; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * WebhookConversion describes how to call a conversion webhook */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1WebhookConversion { public static final String SERIALIZED_NAME_CLIENT_CONFIG = "clientConfig"; @SerializedName(SERIALIZED_NAME_CLIENT_CONFIG) @@ -66,7 +66,6 @@ public V1WebhookConversion() { } public V1WebhookConversion clientConfig(ApiextensionsV1WebhookClientConfig clientConfig) { - this.clientConfig = clientConfig; return this; } @@ -80,14 +79,12 @@ public ApiextensionsV1WebhookClientConfig getClientConfig() { return clientConfig; } - public void setClientConfig(ApiextensionsV1WebhookClientConfig clientConfig) { this.clientConfig = clientConfig; } public V1WebhookConversion conversionReviewVersions(List conversionReviewVersions) { - this.conversionReviewVersions = conversionReviewVersions; return this; } @@ -109,7 +106,6 @@ public List getConversionReviewVersions() { return conversionReviewVersions; } - public void setConversionReviewVersions(List conversionReviewVersions) { this.conversionReviewVersions = conversionReviewVersions; } @@ -171,35 +167,36 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1WebhookConversion + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1WebhookConversion */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1WebhookConversion.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1WebhookConversion.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1WebhookConversion is not found in the empty JSON string", V1WebhookConversion.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1WebhookConversion.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1WebhookConversion` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1WebhookConversion` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1WebhookConversion.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `clientConfig` if (jsonObj.get("clientConfig") != null && !jsonObj.get("clientConfig").isJsonNull()) { - ApiextensionsV1WebhookClientConfig.validateJsonObject(jsonObj.getAsJsonObject("clientConfig")); + ApiextensionsV1WebhookClientConfig.validateJsonElement(jsonObj.get("clientConfig")); } // ensure the required json array is present if (jsonObj.get("conversionReviewVersions") == null) { @@ -229,9 +226,9 @@ public void write(JsonWriter out, V1WebhookConversion value) throws IOException @Override public V1WebhookConversion read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -258,3 +255,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1WeightedPodAffinityTerm.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1WeightedPodAffinityTerm.java index eccd3498d1..4b38e2f657 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1WeightedPodAffinityTerm.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1WeightedPodAffinityTerm.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.openapi.models.V1PodAffinityTerm; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s) */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1WeightedPodAffinityTerm { public static final String SERIALIZED_NAME_POD_AFFINITY_TERM = "podAffinityTerm"; @SerializedName(SERIALIZED_NAME_POD_AFFINITY_TERM) @@ -64,7 +64,6 @@ public V1WeightedPodAffinityTerm() { } public V1WeightedPodAffinityTerm podAffinityTerm(V1PodAffinityTerm podAffinityTerm) { - this.podAffinityTerm = podAffinityTerm; return this; } @@ -78,14 +77,12 @@ public V1PodAffinityTerm getPodAffinityTerm() { return podAffinityTerm; } - public void setPodAffinityTerm(V1PodAffinityTerm podAffinityTerm) { this.podAffinityTerm = podAffinityTerm; } public V1WeightedPodAffinityTerm weight(Integer weight) { - this.weight = weight; return this; } @@ -99,7 +96,6 @@ public Integer getWeight() { return weight; } - public void setWeight(Integer weight) { this.weight = weight; } @@ -162,34 +158,35 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1WeightedPodAffinityTerm + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1WeightedPodAffinityTerm */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1WeightedPodAffinityTerm.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1WeightedPodAffinityTerm.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1WeightedPodAffinityTerm is not found in the empty JSON string", V1WeightedPodAffinityTerm.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1WeightedPodAffinityTerm.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1WeightedPodAffinityTerm` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1WeightedPodAffinityTerm` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1WeightedPodAffinityTerm.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the required field `podAffinityTerm` - V1PodAffinityTerm.validateJsonObject(jsonObj.getAsJsonObject("podAffinityTerm")); + V1PodAffinityTerm.validateJsonElement(jsonObj.get("podAffinityTerm")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -212,9 +209,9 @@ public void write(JsonWriter out, V1WeightedPodAffinityTerm value) throws IOExce @Override public V1WeightedPodAffinityTerm read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -241,3 +238,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1WindowsSecurityContextOptions.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1WindowsSecurityContextOptions.java index d144e6b744..20e8b76094 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1WindowsSecurityContextOptions.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1WindowsSecurityContextOptions.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * WindowsSecurityContextOptions contain Windows-specific options and credentials. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1WindowsSecurityContextOptions { public static final String SERIALIZED_NAME_GMSA_CREDENTIAL_SPEC = "gmsaCredentialSpec"; @SerializedName(SERIALIZED_NAME_GMSA_CREDENTIAL_SPEC) @@ -71,7 +71,6 @@ public V1WindowsSecurityContextOptions() { } public V1WindowsSecurityContextOptions gmsaCredentialSpec(String gmsaCredentialSpec) { - this.gmsaCredentialSpec = gmsaCredentialSpec; return this; } @@ -85,14 +84,12 @@ public String getGmsaCredentialSpec() { return gmsaCredentialSpec; } - public void setGmsaCredentialSpec(String gmsaCredentialSpec) { this.gmsaCredentialSpec = gmsaCredentialSpec; } public V1WindowsSecurityContextOptions gmsaCredentialSpecName(String gmsaCredentialSpecName) { - this.gmsaCredentialSpecName = gmsaCredentialSpecName; return this; } @@ -106,14 +103,12 @@ public String getGmsaCredentialSpecName() { return gmsaCredentialSpecName; } - public void setGmsaCredentialSpecName(String gmsaCredentialSpecName) { this.gmsaCredentialSpecName = gmsaCredentialSpecName; } public V1WindowsSecurityContextOptions hostProcess(Boolean hostProcess) { - this.hostProcess = hostProcess; return this; } @@ -127,14 +122,12 @@ public Boolean getHostProcess() { return hostProcess; } - public void setHostProcess(Boolean hostProcess) { this.hostProcess = hostProcess; } public V1WindowsSecurityContextOptions runAsUserName(String runAsUserName) { - this.runAsUserName = runAsUserName; return this; } @@ -148,7 +141,6 @@ public String getRunAsUserName() { return runAsUserName; } - public void setRunAsUserName(String runAsUserName) { this.runAsUserName = runAsUserName; } @@ -215,25 +207,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1WindowsSecurityContextOptions + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1WindowsSecurityContextOptions */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1WindowsSecurityContextOptions.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1WindowsSecurityContextOptions.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1WindowsSecurityContextOptions is not found in the empty JSON string", V1WindowsSecurityContextOptions.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1WindowsSecurityContextOptions.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1WindowsSecurityContextOptions` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1WindowsSecurityContextOptions` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("gmsaCredentialSpec") != null && !jsonObj.get("gmsaCredentialSpec").isJsonNull()) && !jsonObj.get("gmsaCredentialSpec").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `gmsaCredentialSpec` to be a primitive type in the JSON string but got `%s`", jsonObj.get("gmsaCredentialSpec").toString())); } @@ -265,9 +258,9 @@ public void write(JsonWriter out, V1WindowsSecurityContextOptions value) throws @Override public V1WindowsSecurityContextOptions read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -294,3 +287,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1AuditAnnotation.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1AuditAnnotation.java index 996e33f7f7..777c5dd5e8 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1AuditAnnotation.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1AuditAnnotation.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * AuditAnnotation describes how to produce an audit annotation for an API request. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha1AuditAnnotation { public static final String SERIALIZED_NAME_KEY = "key"; @SerializedName(SERIALIZED_NAME_KEY) @@ -63,7 +63,6 @@ public V1alpha1AuditAnnotation() { } public V1alpha1AuditAnnotation key(String key) { - this.key = key; return this; } @@ -77,14 +76,12 @@ public String getKey() { return key; } - public void setKey(String key) { this.key = key; } public V1alpha1AuditAnnotation valueExpression(String valueExpression) { - this.valueExpression = valueExpression; return this; } @@ -98,7 +95,6 @@ public String getValueExpression() { return valueExpression; } - public void setValueExpression(String valueExpression) { this.valueExpression = valueExpression; } @@ -161,32 +157,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha1AuditAnnotation + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha1AuditAnnotation */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha1AuditAnnotation.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha1AuditAnnotation.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha1AuditAnnotation is not found in the empty JSON string", V1alpha1AuditAnnotation.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha1AuditAnnotation.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1AuditAnnotation` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1AuditAnnotation` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1alpha1AuditAnnotation.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("key").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `key` to be a primitive type in the JSON string but got `%s`", jsonObj.get("key").toString())); } @@ -215,9 +212,9 @@ public void write(JsonWriter out, V1alpha1AuditAnnotation value) throws IOExcept @Override public V1alpha1AuditAnnotation read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -244,3 +241,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterTrustBundle.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterTrustBundle.java index 0966c4bfed..7123710e97 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterTrustBundle.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterTrustBundle.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1ObjectMeta; import io.kubernetes.client.openapi.models.V1alpha1ClusterTrustBundleSpec; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -43,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -51,7 +51,7 @@ /** * ClusterTrustBundle is a cluster-scoped container for X.509 trust anchors (root certificates). ClusterTrustBundle objects are considered to be readable by any authenticated user in the cluster, because they can be mounted by pods using the `clusterTrustBundle` projection. All service accounts have read access to ClusterTrustBundles by default. Users who only have namespace-level access to a cluster can read ClusterTrustBundles by impersonating a serviceaccount that they have access to. It can be optionally associated with a particular assigner, in which case it contains one valid set of trust anchors for that signer. Signers may have multiple associated ClusterTrustBundles; each is an independent set of trust anchors for that signer. Admission control is used to enforce that only users with permissions on the signer can create or modify the corresponding bundle. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha1ClusterTrustBundle implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -73,7 +73,6 @@ public V1alpha1ClusterTrustBundle() { } public V1alpha1ClusterTrustBundle apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -87,14 +86,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1alpha1ClusterTrustBundle kind(String kind) { - this.kind = kind; return this; } @@ -108,14 +105,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1alpha1ClusterTrustBundle metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -129,14 +124,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V1alpha1ClusterTrustBundle spec(V1alpha1ClusterTrustBundleSpec spec) { - this.spec = spec; return this; } @@ -150,7 +143,6 @@ public V1alpha1ClusterTrustBundleSpec getSpec() { return spec; } - public void setSpec(V1alpha1ClusterTrustBundleSpec spec) { this.spec = spec; } @@ -218,32 +210,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha1ClusterTrustBundle + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha1ClusterTrustBundle */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha1ClusterTrustBundle.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha1ClusterTrustBundle.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha1ClusterTrustBundle is not found in the empty JSON string", V1alpha1ClusterTrustBundle.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha1ClusterTrustBundle.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1ClusterTrustBundle` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1ClusterTrustBundle` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1alpha1ClusterTrustBundle.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -252,10 +245,10 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } // validate the required field `spec` - V1alpha1ClusterTrustBundleSpec.validateJsonObject(jsonObj.getAsJsonObject("spec")); + V1alpha1ClusterTrustBundleSpec.validateJsonElement(jsonObj.get("spec")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -278,9 +271,9 @@ public void write(JsonWriter out, V1alpha1ClusterTrustBundle value) throws IOExc @Override public V1alpha1ClusterTrustBundle read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -307,3 +300,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterTrustBundleList.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterTrustBundleList.java index 3ae3aaa87b..1f8b9c4b79 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterTrustBundleList.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterTrustBundleList.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1alpha1ClusterTrustBundle; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * ClusterTrustBundleList is a collection of ClusterTrustBundle objects */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha1ClusterTrustBundleList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -75,7 +75,6 @@ public V1alpha1ClusterTrustBundleList() { } public V1alpha1ClusterTrustBundleList apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -89,14 +88,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1alpha1ClusterTrustBundleList items(List items) { - this.items = items; return this; } @@ -118,14 +115,12 @@ public List getItems() { return items; } - public void setItems(List items) { this.items = items; } public V1alpha1ClusterTrustBundleList kind(String kind) { - this.kind = kind; return this; } @@ -139,14 +134,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1alpha1ClusterTrustBundleList metadata(V1ListMeta metadata) { - this.metadata = metadata; return this; } @@ -160,7 +153,6 @@ public V1ListMeta getMetadata() { return metadata; } - public void setMetadata(V1ListMeta metadata) { this.metadata = metadata; } @@ -228,32 +220,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha1ClusterTrustBundleList + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha1ClusterTrustBundleList */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha1ClusterTrustBundleList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha1ClusterTrustBundleList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha1ClusterTrustBundleList is not found in the empty JSON string", V1alpha1ClusterTrustBundleList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha1ClusterTrustBundleList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1ClusterTrustBundleList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1ClusterTrustBundleList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1alpha1ClusterTrustBundleList.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -265,14 +258,14 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); // validate the required field `items` (array) for (int i = 0; i < jsonArrayitems.size(); i++) { - V1alpha1ClusterTrustBundle.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject()); + V1alpha1ClusterTrustBundle.validateJsonElement(jsonArrayitems.get(i)); }; if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ListMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ListMeta.validateJsonElement(jsonObj.get("metadata")); } } @@ -296,9 +289,9 @@ public void write(JsonWriter out, V1alpha1ClusterTrustBundleList value) throws I @Override public V1alpha1ClusterTrustBundleList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -325,3 +318,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterTrustBundleSpec.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterTrustBundleSpec.java index 99f49eba4b..423b894f4d 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterTrustBundleSpec.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterTrustBundleSpec.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * ClusterTrustBundleSpec contains the signer and trust anchors. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha1ClusterTrustBundleSpec { public static final String SERIALIZED_NAME_SIGNER_NAME = "signerName"; @SerializedName(SERIALIZED_NAME_SIGNER_NAME) @@ -63,7 +63,6 @@ public V1alpha1ClusterTrustBundleSpec() { } public V1alpha1ClusterTrustBundleSpec signerName(String signerName) { - this.signerName = signerName; return this; } @@ -77,14 +76,12 @@ public String getSignerName() { return signerName; } - public void setSignerName(String signerName) { this.signerName = signerName; } public V1alpha1ClusterTrustBundleSpec trustBundle(String trustBundle) { - this.trustBundle = trustBundle; return this; } @@ -98,7 +95,6 @@ public String getTrustBundle() { return trustBundle; } - public void setTrustBundle(String trustBundle) { this.trustBundle = trustBundle; } @@ -160,32 +156,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha1ClusterTrustBundleSpec + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha1ClusterTrustBundleSpec */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha1ClusterTrustBundleSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha1ClusterTrustBundleSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha1ClusterTrustBundleSpec is not found in the empty JSON string", V1alpha1ClusterTrustBundleSpec.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha1ClusterTrustBundleSpec.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1ClusterTrustBundleSpec` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1ClusterTrustBundleSpec` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1alpha1ClusterTrustBundleSpec.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("signerName") != null && !jsonObj.get("signerName").isJsonNull()) && !jsonObj.get("signerName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `signerName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("signerName").toString())); } @@ -214,9 +211,9 @@ public void write(JsonWriter out, V1alpha1ClusterTrustBundleSpec value) throws I @Override public V1alpha1ClusterTrustBundleSpec read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -243,3 +240,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ExpressionWarning.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ExpressionWarning.java index 8772905419..ebc6863340 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ExpressionWarning.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ExpressionWarning.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * ExpressionWarning is a warning information that targets a specific expression. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha1ExpressionWarning { public static final String SERIALIZED_NAME_FIELD_REF = "fieldRef"; @SerializedName(SERIALIZED_NAME_FIELD_REF) @@ -63,7 +63,6 @@ public V1alpha1ExpressionWarning() { } public V1alpha1ExpressionWarning fieldRef(String fieldRef) { - this.fieldRef = fieldRef; return this; } @@ -77,14 +76,12 @@ public String getFieldRef() { return fieldRef; } - public void setFieldRef(String fieldRef) { this.fieldRef = fieldRef; } public V1alpha1ExpressionWarning warning(String warning) { - this.warning = warning; return this; } @@ -98,7 +95,6 @@ public String getWarning() { return warning; } - public void setWarning(String warning) { this.warning = warning; } @@ -161,32 +157,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha1ExpressionWarning + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha1ExpressionWarning */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha1ExpressionWarning.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha1ExpressionWarning.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha1ExpressionWarning is not found in the empty JSON string", V1alpha1ExpressionWarning.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha1ExpressionWarning.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1ExpressionWarning` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1ExpressionWarning` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1alpha1ExpressionWarning.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("fieldRef").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `fieldRef` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fieldRef").toString())); } @@ -215,9 +212,9 @@ public void write(JsonWriter out, V1alpha1ExpressionWarning value) throws IOExce @Override public V1alpha1ExpressionWarning read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -244,3 +241,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1GroupVersionResource.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1GroupVersionResource.java index eb576e5a80..937cd58992 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1GroupVersionResource.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1GroupVersionResource.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * The names of the group, the version, and the resource. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha1GroupVersionResource { public static final String SERIALIZED_NAME_GROUP = "group"; @SerializedName(SERIALIZED_NAME_GROUP) @@ -67,7 +67,6 @@ public V1alpha1GroupVersionResource() { } public V1alpha1GroupVersionResource group(String group) { - this.group = group; return this; } @@ -81,14 +80,12 @@ public String getGroup() { return group; } - public void setGroup(String group) { this.group = group; } public V1alpha1GroupVersionResource resource(String resource) { - this.resource = resource; return this; } @@ -102,14 +99,12 @@ public String getResource() { return resource; } - public void setResource(String resource) { this.resource = resource; } public V1alpha1GroupVersionResource version(String version) { - this.version = version; return this; } @@ -123,7 +118,6 @@ public String getVersion() { return version; } - public void setVersion(String version) { this.version = version; } @@ -187,25 +181,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha1GroupVersionResource + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha1GroupVersionResource */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha1GroupVersionResource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha1GroupVersionResource.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha1GroupVersionResource is not found in the empty JSON string", V1alpha1GroupVersionResource.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha1GroupVersionResource.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1GroupVersionResource` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1GroupVersionResource` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("group") != null && !jsonObj.get("group").isJsonNull()) && !jsonObj.get("group").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `group` to be a primitive type in the JSON string but got `%s`", jsonObj.get("group").toString())); } @@ -237,9 +232,9 @@ public void write(JsonWriter out, V1alpha1GroupVersionResource value) throws IOE @Override public V1alpha1GroupVersionResource read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -266,3 +261,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1IPAddress.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1IPAddress.java index 28f7a161c1..5ae1ba5227 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1IPAddress.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1IPAddress.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1ObjectMeta; import io.kubernetes.client.openapi.models.V1alpha1IPAddressSpec; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -43,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -51,7 +51,7 @@ /** * IPAddress represents a single IP of a single IP Family. The object is designed to be used by APIs that operate on IP addresses. The object is used by the Service core API for allocation of IP addresses. An IP address can be represented in different formats, to guarantee the uniqueness of the IP, the name of the object is the IP address in canonical format, four decimal digits separated by dots suppressing leading zeros for IPv4 and the representation defined by RFC 5952 for IPv6. Valid: 192.168.1.5 or 2001:db8::1 or 2001:db8:aaaa:bbbb:cccc:dddd:eeee:1 Invalid: 10.01.2.3 or 2001:db8:0:0:0::1 */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha1IPAddress implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -73,7 +73,6 @@ public V1alpha1IPAddress() { } public V1alpha1IPAddress apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -87,14 +86,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1alpha1IPAddress kind(String kind) { - this.kind = kind; return this; } @@ -108,14 +105,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1alpha1IPAddress metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -129,14 +124,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V1alpha1IPAddress spec(V1alpha1IPAddressSpec spec) { - this.spec = spec; return this; } @@ -150,7 +143,6 @@ public V1alpha1IPAddressSpec getSpec() { return spec; } - public void setSpec(V1alpha1IPAddressSpec spec) { this.spec = spec; } @@ -217,25 +209,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha1IPAddress + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha1IPAddress */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha1IPAddress.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha1IPAddress.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha1IPAddress is not found in the empty JSON string", V1alpha1IPAddress.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha1IPAddress.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1IPAddress` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1IPAddress` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -244,11 +237,11 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } // validate the optional field `spec` if (jsonObj.get("spec") != null && !jsonObj.get("spec").isJsonNull()) { - V1alpha1IPAddressSpec.validateJsonObject(jsonObj.getAsJsonObject("spec")); + V1alpha1IPAddressSpec.validateJsonElement(jsonObj.get("spec")); } } @@ -272,9 +265,9 @@ public void write(JsonWriter out, V1alpha1IPAddress value) throws IOException { @Override public V1alpha1IPAddress read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -301,3 +294,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1IPAddressList.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1IPAddressList.java index 26638cf1fc..911d8480e8 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1IPAddressList.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1IPAddressList.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1alpha1IPAddress; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * IPAddressList contains a list of IPAddress. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha1IPAddressList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -75,7 +75,6 @@ public V1alpha1IPAddressList() { } public V1alpha1IPAddressList apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -89,14 +88,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1alpha1IPAddressList items(List items) { - this.items = items; return this; } @@ -118,14 +115,12 @@ public List getItems() { return items; } - public void setItems(List items) { this.items = items; } public V1alpha1IPAddressList kind(String kind) { - this.kind = kind; return this; } @@ -139,14 +134,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1alpha1IPAddressList metadata(V1ListMeta metadata) { - this.metadata = metadata; return this; } @@ -160,7 +153,6 @@ public V1ListMeta getMetadata() { return metadata; } - public void setMetadata(V1ListMeta metadata) { this.metadata = metadata; } @@ -228,32 +220,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha1IPAddressList + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha1IPAddressList */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha1IPAddressList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha1IPAddressList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha1IPAddressList is not found in the empty JSON string", V1alpha1IPAddressList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha1IPAddressList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1IPAddressList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1IPAddressList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1alpha1IPAddressList.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -265,14 +258,14 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); // validate the required field `items` (array) for (int i = 0; i < jsonArrayitems.size(); i++) { - V1alpha1IPAddress.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject()); + V1alpha1IPAddress.validateJsonElement(jsonArrayitems.get(i)); }; if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ListMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ListMeta.validateJsonElement(jsonObj.get("metadata")); } } @@ -296,9 +289,9 @@ public void write(JsonWriter out, V1alpha1IPAddressList value) throws IOExceptio @Override public V1alpha1IPAddressList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -325,3 +318,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1IPAddressSpec.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1IPAddressSpec.java index 96d8e93e17..596727d1ec 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1IPAddressSpec.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1IPAddressSpec.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.openapi.models.V1alpha1ParentReference; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * IPAddressSpec describe the attributes in an IP Address. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha1IPAddressSpec { public static final String SERIALIZED_NAME_PARENT_REF = "parentRef"; @SerializedName(SERIALIZED_NAME_PARENT_REF) @@ -60,7 +60,6 @@ public V1alpha1IPAddressSpec() { } public V1alpha1IPAddressSpec parentRef(V1alpha1ParentReference parentRef) { - this.parentRef = parentRef; return this; } @@ -74,7 +73,6 @@ public V1alpha1ParentReference getParentRef() { return parentRef; } - public void setParentRef(V1alpha1ParentReference parentRef) { this.parentRef = parentRef; } @@ -133,34 +131,35 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha1IPAddressSpec + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha1IPAddressSpec */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha1IPAddressSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha1IPAddressSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha1IPAddressSpec is not found in the empty JSON string", V1alpha1IPAddressSpec.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha1IPAddressSpec.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1IPAddressSpec` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1IPAddressSpec` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1alpha1IPAddressSpec.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the required field `parentRef` - V1alpha1ParentReference.validateJsonObject(jsonObj.getAsJsonObject("parentRef")); + V1alpha1ParentReference.validateJsonElement(jsonObj.get("parentRef")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -183,9 +182,9 @@ public void write(JsonWriter out, V1alpha1IPAddressSpec value) throws IOExceptio @Override public V1alpha1IPAddressSpec read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -212,3 +211,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1MatchCondition.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1MatchCondition.java index f4205e2d60..91423d1d48 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1MatchCondition.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1MatchCondition.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * V1alpha1MatchCondition */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha1MatchCondition { public static final String SERIALIZED_NAME_EXPRESSION = "expression"; @SerializedName(SERIALIZED_NAME_EXPRESSION) @@ -63,7 +63,6 @@ public V1alpha1MatchCondition() { } public V1alpha1MatchCondition expression(String expression) { - this.expression = expression; return this; } @@ -77,14 +76,12 @@ public String getExpression() { return expression; } - public void setExpression(String expression) { this.expression = expression; } public V1alpha1MatchCondition name(String name) { - this.name = name; return this; } @@ -98,7 +95,6 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } @@ -161,32 +157,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha1MatchCondition + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha1MatchCondition */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha1MatchCondition.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha1MatchCondition.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha1MatchCondition is not found in the empty JSON string", V1alpha1MatchCondition.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha1MatchCondition.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1MatchCondition` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1MatchCondition` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1alpha1MatchCondition.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("expression").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `expression` to be a primitive type in the JSON string but got `%s`", jsonObj.get("expression").toString())); } @@ -215,9 +212,9 @@ public void write(JsonWriter out, V1alpha1MatchCondition value) throws IOExcepti @Override public V1alpha1MatchCondition read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -244,3 +241,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1MatchResources.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1MatchResources.java index 9659370c15..18dc7ead8c 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1MatchResources.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1MatchResources.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1alpha1NamedRuleWithOperations; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,11 +53,11 @@ /** * MatchResources decides whether to run the admission control policy on an object based on whether it meets the match criteria. The exclude rules take precedence over include rules (if a resource matches both, it is excluded) */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha1MatchResources { public static final String SERIALIZED_NAME_EXCLUDE_RESOURCE_RULES = "excludeResourceRules"; @SerializedName(SERIALIZED_NAME_EXCLUDE_RESOURCE_RULES) - private List excludeResourceRules; + private List excludeResourceRules = new ArrayList<>(); public static final String SERIALIZED_NAME_MATCH_POLICY = "matchPolicy"; @SerializedName(SERIALIZED_NAME_MATCH_POLICY) @@ -73,13 +73,12 @@ public class V1alpha1MatchResources { public static final String SERIALIZED_NAME_RESOURCE_RULES = "resourceRules"; @SerializedName(SERIALIZED_NAME_RESOURCE_RULES) - private List resourceRules; + private List resourceRules = new ArrayList<>(); public V1alpha1MatchResources() { } public V1alpha1MatchResources excludeResourceRules(List excludeResourceRules) { - this.excludeResourceRules = excludeResourceRules; return this; } @@ -101,14 +100,12 @@ public List getExcludeResourceRules() { return excludeResourceRules; } - public void setExcludeResourceRules(List excludeResourceRules) { this.excludeResourceRules = excludeResourceRules; } public V1alpha1MatchResources matchPolicy(String matchPolicy) { - this.matchPolicy = matchPolicy; return this; } @@ -122,14 +119,12 @@ public String getMatchPolicy() { return matchPolicy; } - public void setMatchPolicy(String matchPolicy) { this.matchPolicy = matchPolicy; } public V1alpha1MatchResources namespaceSelector(V1LabelSelector namespaceSelector) { - this.namespaceSelector = namespaceSelector; return this; } @@ -143,14 +138,12 @@ public V1LabelSelector getNamespaceSelector() { return namespaceSelector; } - public void setNamespaceSelector(V1LabelSelector namespaceSelector) { this.namespaceSelector = namespaceSelector; } public V1alpha1MatchResources objectSelector(V1LabelSelector objectSelector) { - this.objectSelector = objectSelector; return this; } @@ -164,14 +157,12 @@ public V1LabelSelector getObjectSelector() { return objectSelector; } - public void setObjectSelector(V1LabelSelector objectSelector) { this.objectSelector = objectSelector; } public V1alpha1MatchResources resourceRules(List resourceRules) { - this.resourceRules = resourceRules; return this; } @@ -193,7 +184,6 @@ public List getResourceRules() { return resourceRules; } - public void setResourceRules(List resourceRules) { this.resourceRules = resourceRules; } @@ -263,25 +253,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha1MatchResources + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha1MatchResources */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha1MatchResources.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha1MatchResources.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha1MatchResources is not found in the empty JSON string", V1alpha1MatchResources.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha1MatchResources.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1MatchResources` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1MatchResources` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (jsonObj.get("excludeResourceRules") != null && !jsonObj.get("excludeResourceRules").isJsonNull()) { JsonArray jsonArrayexcludeResourceRules = jsonObj.getAsJsonArray("excludeResourceRules"); if (jsonArrayexcludeResourceRules != null) { @@ -292,7 +283,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `excludeResourceRules` (array) for (int i = 0; i < jsonArrayexcludeResourceRules.size(); i++) { - V1alpha1NamedRuleWithOperations.validateJsonObject(jsonArrayexcludeResourceRules.get(i).getAsJsonObject()); + V1alpha1NamedRuleWithOperations.validateJsonElement(jsonArrayexcludeResourceRules.get(i)); }; } } @@ -301,11 +292,11 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `namespaceSelector` if (jsonObj.get("namespaceSelector") != null && !jsonObj.get("namespaceSelector").isJsonNull()) { - V1LabelSelector.validateJsonObject(jsonObj.getAsJsonObject("namespaceSelector")); + V1LabelSelector.validateJsonElement(jsonObj.get("namespaceSelector")); } // validate the optional field `objectSelector` if (jsonObj.get("objectSelector") != null && !jsonObj.get("objectSelector").isJsonNull()) { - V1LabelSelector.validateJsonObject(jsonObj.getAsJsonObject("objectSelector")); + V1LabelSelector.validateJsonElement(jsonObj.get("objectSelector")); } if (jsonObj.get("resourceRules") != null && !jsonObj.get("resourceRules").isJsonNull()) { JsonArray jsonArrayresourceRules = jsonObj.getAsJsonArray("resourceRules"); @@ -317,7 +308,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `resourceRules` (array) for (int i = 0; i < jsonArrayresourceRules.size(); i++) { - V1alpha1NamedRuleWithOperations.validateJsonObject(jsonArrayresourceRules.get(i).getAsJsonObject()); + V1alpha1NamedRuleWithOperations.validateJsonElement(jsonArrayresourceRules.get(i)); }; } } @@ -343,9 +334,9 @@ public void write(JsonWriter out, V1alpha1MatchResources value) throws IOExcepti @Override public V1alpha1MatchResources read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -372,3 +363,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1MigrationCondition.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1MigrationCondition.java index 3f235bcb52..435adbaad5 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1MigrationCondition.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1MigrationCondition.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * Describes the state of a migration at a certain point. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha1MigrationCondition { public static final String SERIALIZED_NAME_LAST_UPDATE_TIME = "lastUpdateTime"; @SerializedName(SERIALIZED_NAME_LAST_UPDATE_TIME) @@ -76,7 +76,6 @@ public V1alpha1MigrationCondition() { } public V1alpha1MigrationCondition lastUpdateTime(OffsetDateTime lastUpdateTime) { - this.lastUpdateTime = lastUpdateTime; return this; } @@ -90,14 +89,12 @@ public OffsetDateTime getLastUpdateTime() { return lastUpdateTime; } - public void setLastUpdateTime(OffsetDateTime lastUpdateTime) { this.lastUpdateTime = lastUpdateTime; } public V1alpha1MigrationCondition message(String message) { - this.message = message; return this; } @@ -111,14 +108,12 @@ public String getMessage() { return message; } - public void setMessage(String message) { this.message = message; } public V1alpha1MigrationCondition reason(String reason) { - this.reason = reason; return this; } @@ -132,14 +127,12 @@ public String getReason() { return reason; } - public void setReason(String reason) { this.reason = reason; } public V1alpha1MigrationCondition status(String status) { - this.status = status; return this; } @@ -153,14 +146,12 @@ public String getStatus() { return status; } - public void setStatus(String status) { this.status = status; } public V1alpha1MigrationCondition type(String type) { - this.type = type; return this; } @@ -174,7 +165,6 @@ public String getType() { return type; } - public void setType(String type) { this.type = type; } @@ -246,32 +236,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha1MigrationCondition + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha1MigrationCondition */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha1MigrationCondition.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha1MigrationCondition.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha1MigrationCondition is not found in the empty JSON string", V1alpha1MigrationCondition.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha1MigrationCondition.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1MigrationCondition` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1MigrationCondition` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1alpha1MigrationCondition.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); } @@ -306,9 +297,9 @@ public void write(JsonWriter out, V1alpha1MigrationCondition value) throws IOExc @Override public V1alpha1MigrationCondition read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -335,3 +326,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1NamedRuleWithOperations.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1NamedRuleWithOperations.java index a30f286042..c61aa3b408 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1NamedRuleWithOperations.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1NamedRuleWithOperations.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -43,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -51,27 +51,27 @@ /** * NamedRuleWithOperations is a tuple of Operations and Resources with ResourceNames. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha1NamedRuleWithOperations { public static final String SERIALIZED_NAME_API_GROUPS = "apiGroups"; @SerializedName(SERIALIZED_NAME_API_GROUPS) - private List apiGroups; + private List apiGroups = new ArrayList<>(); public static final String SERIALIZED_NAME_API_VERSIONS = "apiVersions"; @SerializedName(SERIALIZED_NAME_API_VERSIONS) - private List apiVersions; + private List apiVersions = new ArrayList<>(); public static final String SERIALIZED_NAME_OPERATIONS = "operations"; @SerializedName(SERIALIZED_NAME_OPERATIONS) - private List operations; + private List operations = new ArrayList<>(); public static final String SERIALIZED_NAME_RESOURCE_NAMES = "resourceNames"; @SerializedName(SERIALIZED_NAME_RESOURCE_NAMES) - private List resourceNames; + private List resourceNames = new ArrayList<>(); public static final String SERIALIZED_NAME_RESOURCES = "resources"; @SerializedName(SERIALIZED_NAME_RESOURCES) - private List resources; + private List resources = new ArrayList<>(); public static final String SERIALIZED_NAME_SCOPE = "scope"; @SerializedName(SERIALIZED_NAME_SCOPE) @@ -81,7 +81,6 @@ public V1alpha1NamedRuleWithOperations() { } public V1alpha1NamedRuleWithOperations apiGroups(List apiGroups) { - this.apiGroups = apiGroups; return this; } @@ -103,14 +102,12 @@ public List getApiGroups() { return apiGroups; } - public void setApiGroups(List apiGroups) { this.apiGroups = apiGroups; } public V1alpha1NamedRuleWithOperations apiVersions(List apiVersions) { - this.apiVersions = apiVersions; return this; } @@ -132,14 +129,12 @@ public List getApiVersions() { return apiVersions; } - public void setApiVersions(List apiVersions) { this.apiVersions = apiVersions; } public V1alpha1NamedRuleWithOperations operations(List operations) { - this.operations = operations; return this; } @@ -161,14 +156,12 @@ public List getOperations() { return operations; } - public void setOperations(List operations) { this.operations = operations; } public V1alpha1NamedRuleWithOperations resourceNames(List resourceNames) { - this.resourceNames = resourceNames; return this; } @@ -190,14 +183,12 @@ public List getResourceNames() { return resourceNames; } - public void setResourceNames(List resourceNames) { this.resourceNames = resourceNames; } public V1alpha1NamedRuleWithOperations resources(List resources) { - this.resources = resources; return this; } @@ -219,14 +210,12 @@ public List getResources() { return resources; } - public void setResources(List resources) { this.resources = resources; } public V1alpha1NamedRuleWithOperations scope(String scope) { - this.scope = scope; return this; } @@ -240,7 +229,6 @@ public String getScope() { return scope; } - public void setScope(String scope) { this.scope = scope; } @@ -313,43 +301,44 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha1NamedRuleWithOperations + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha1NamedRuleWithOperations */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha1NamedRuleWithOperations.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha1NamedRuleWithOperations.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha1NamedRuleWithOperations is not found in the empty JSON string", V1alpha1NamedRuleWithOperations.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha1NamedRuleWithOperations.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1NamedRuleWithOperations` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1NamedRuleWithOperations` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the optional json data is an array if present - if (jsonObj.get("apiGroups") != null && !jsonObj.get("apiGroups").isJsonArray()) { + if (jsonObj.get("apiGroups") != null && !jsonObj.get("apiGroups").isJsonNull() && !jsonObj.get("apiGroups").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `apiGroups` to be an array in the JSON string but got `%s`", jsonObj.get("apiGroups").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("apiVersions") != null && !jsonObj.get("apiVersions").isJsonArray()) { + if (jsonObj.get("apiVersions") != null && !jsonObj.get("apiVersions").isJsonNull() && !jsonObj.get("apiVersions").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersions` to be an array in the JSON string but got `%s`", jsonObj.get("apiVersions").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("operations") != null && !jsonObj.get("operations").isJsonArray()) { + if (jsonObj.get("operations") != null && !jsonObj.get("operations").isJsonNull() && !jsonObj.get("operations").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `operations` to be an array in the JSON string but got `%s`", jsonObj.get("operations").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("resourceNames") != null && !jsonObj.get("resourceNames").isJsonArray()) { + if (jsonObj.get("resourceNames") != null && !jsonObj.get("resourceNames").isJsonNull() && !jsonObj.get("resourceNames").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `resourceNames` to be an array in the JSON string but got `%s`", jsonObj.get("resourceNames").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("resources") != null && !jsonObj.get("resources").isJsonArray()) { + if (jsonObj.get("resources") != null && !jsonObj.get("resources").isJsonNull() && !jsonObj.get("resources").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `resources` to be an array in the JSON string but got `%s`", jsonObj.get("resources").toString())); } if ((jsonObj.get("scope") != null && !jsonObj.get("scope").isJsonNull()) && !jsonObj.get("scope").isJsonPrimitive()) { @@ -377,9 +366,9 @@ public void write(JsonWriter out, V1alpha1NamedRuleWithOperations value) throws @Override public V1alpha1NamedRuleWithOperations read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -406,3 +395,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ParamKind.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ParamKind.java index 8066445e3f..783be2b3f8 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ParamKind.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ParamKind.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * ParamKind is a tuple of Group Kind and Version. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha1ParamKind { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -63,7 +63,6 @@ public V1alpha1ParamKind() { } public V1alpha1ParamKind apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -77,14 +76,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1alpha1ParamKind kind(String kind) { - this.kind = kind; return this; } @@ -98,7 +95,6 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } @@ -159,25 +155,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha1ParamKind + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha1ParamKind */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha1ParamKind.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha1ParamKind.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha1ParamKind is not found in the empty JSON string", V1alpha1ParamKind.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha1ParamKind.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1ParamKind` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1ParamKind` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -206,9 +203,9 @@ public void write(JsonWriter out, V1alpha1ParamKind value) throws IOException { @Override public V1alpha1ParamKind read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -235,3 +232,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ParamRef.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ParamRef.java index 774bc1a099..960bcc4261 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ParamRef.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ParamRef.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.openapi.models.V1LabelSelector; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * ParamRef describes how to locate the params to be used as input to expressions of rules applied by a policy binding. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha1ParamRef { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) @@ -72,7 +72,6 @@ public V1alpha1ParamRef() { } public V1alpha1ParamRef name(String name) { - this.name = name; return this; } @@ -86,14 +85,12 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } public V1alpha1ParamRef namespace(String namespace) { - this.namespace = namespace; return this; } @@ -107,14 +104,12 @@ public String getNamespace() { return namespace; } - public void setNamespace(String namespace) { this.namespace = namespace; } public V1alpha1ParamRef parameterNotFoundAction(String parameterNotFoundAction) { - this.parameterNotFoundAction = parameterNotFoundAction; return this; } @@ -128,14 +123,12 @@ public String getParameterNotFoundAction() { return parameterNotFoundAction; } - public void setParameterNotFoundAction(String parameterNotFoundAction) { this.parameterNotFoundAction = parameterNotFoundAction; } public V1alpha1ParamRef selector(V1LabelSelector selector) { - this.selector = selector; return this; } @@ -149,7 +142,6 @@ public V1LabelSelector getSelector() { return selector; } - public void setSelector(V1LabelSelector selector) { this.selector = selector; } @@ -216,25 +208,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha1ParamRef + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha1ParamRef */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha1ParamRef.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha1ParamRef.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha1ParamRef is not found in the empty JSON string", V1alpha1ParamRef.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha1ParamRef.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1ParamRef` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1ParamRef` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } @@ -246,7 +239,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `selector` if (jsonObj.get("selector") != null && !jsonObj.get("selector").isJsonNull()) { - V1LabelSelector.validateJsonObject(jsonObj.getAsJsonObject("selector")); + V1LabelSelector.validateJsonElement(jsonObj.get("selector")); } } @@ -270,9 +263,9 @@ public void write(JsonWriter out, V1alpha1ParamRef value) throws IOException { @Override public V1alpha1ParamRef read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -299,3 +292,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ParentReference.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ParentReference.java index 756ce5fb55..322d974c6c 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ParentReference.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ParentReference.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * ParentReference describes a reference to a parent object. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha1ParentReference { public static final String SERIALIZED_NAME_GROUP = "group"; @SerializedName(SERIALIZED_NAME_GROUP) @@ -71,7 +71,6 @@ public V1alpha1ParentReference() { } public V1alpha1ParentReference group(String group) { - this.group = group; return this; } @@ -85,14 +84,12 @@ public String getGroup() { return group; } - public void setGroup(String group) { this.group = group; } public V1alpha1ParentReference name(String name) { - this.name = name; return this; } @@ -106,14 +103,12 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } public V1alpha1ParentReference namespace(String namespace) { - this.namespace = namespace; return this; } @@ -127,14 +122,12 @@ public String getNamespace() { return namespace; } - public void setNamespace(String namespace) { this.namespace = namespace; } public V1alpha1ParentReference resource(String resource) { - this.resource = resource; return this; } @@ -148,7 +141,6 @@ public String getResource() { return resource; } - public void setResource(String resource) { this.resource = resource; } @@ -217,32 +209,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha1ParentReference + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha1ParentReference */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha1ParentReference.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha1ParentReference.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha1ParentReference is not found in the empty JSON string", V1alpha1ParentReference.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha1ParentReference.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1ParentReference` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1ParentReference` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1alpha1ParentReference.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("group") != null && !jsonObj.get("group").isJsonNull()) && !jsonObj.get("group").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `group` to be a primitive type in the JSON string but got `%s`", jsonObj.get("group").toString())); } @@ -277,9 +270,9 @@ public void write(JsonWriter out, V1alpha1ParentReference value) throws IOExcept @Override public V1alpha1ParentReference read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -306,3 +299,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1SelfSubjectReview.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1SelfSubjectReview.java index 9721a2e53c..b920c07fd2 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1SelfSubjectReview.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1SelfSubjectReview.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1ObjectMeta; import io.kubernetes.client.openapi.models.V1alpha1SelfSubjectReviewStatus; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -43,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -51,7 +51,7 @@ /** * SelfSubjectReview contains the user information that the kube-apiserver has about the user making this request. When using impersonation, users will receive the user info of the user being impersonated. If impersonation or request header authentication is used, any extra keys will have their case ignored and returned as lowercase. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha1SelfSubjectReview implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -73,7 +73,6 @@ public V1alpha1SelfSubjectReview() { } public V1alpha1SelfSubjectReview apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -87,14 +86,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1alpha1SelfSubjectReview kind(String kind) { - this.kind = kind; return this; } @@ -108,14 +105,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1alpha1SelfSubjectReview metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -129,14 +124,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V1alpha1SelfSubjectReview status(V1alpha1SelfSubjectReviewStatus status) { - this.status = status; return this; } @@ -150,7 +143,6 @@ public V1alpha1SelfSubjectReviewStatus getStatus() { return status; } - public void setStatus(V1alpha1SelfSubjectReviewStatus status) { this.status = status; } @@ -217,25 +209,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha1SelfSubjectReview + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha1SelfSubjectReview */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha1SelfSubjectReview.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha1SelfSubjectReview.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha1SelfSubjectReview is not found in the empty JSON string", V1alpha1SelfSubjectReview.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha1SelfSubjectReview.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1SelfSubjectReview` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1SelfSubjectReview` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -244,11 +237,11 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } // validate the optional field `status` if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { - V1alpha1SelfSubjectReviewStatus.validateJsonObject(jsonObj.getAsJsonObject("status")); + V1alpha1SelfSubjectReviewStatus.validateJsonElement(jsonObj.get("status")); } } @@ -272,9 +265,9 @@ public void write(JsonWriter out, V1alpha1SelfSubjectReview value) throws IOExce @Override public V1alpha1SelfSubjectReview read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -301,3 +294,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1SelfSubjectReviewStatus.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1SelfSubjectReviewStatus.java index eb5eebf0d9..449ad5328e 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1SelfSubjectReviewStatus.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1SelfSubjectReviewStatus.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.openapi.models.V1UserInfo; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * SelfSubjectReviewStatus is filled by the kube-apiserver and sent back to a user. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha1SelfSubjectReviewStatus { public static final String SERIALIZED_NAME_USER_INFO = "userInfo"; @SerializedName(SERIALIZED_NAME_USER_INFO) @@ -60,7 +60,6 @@ public V1alpha1SelfSubjectReviewStatus() { } public V1alpha1SelfSubjectReviewStatus userInfo(V1UserInfo userInfo) { - this.userInfo = userInfo; return this; } @@ -74,7 +73,6 @@ public V1UserInfo getUserInfo() { return userInfo; } - public void setUserInfo(V1UserInfo userInfo) { this.userInfo = userInfo; } @@ -132,28 +130,29 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha1SelfSubjectReviewStatus + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha1SelfSubjectReviewStatus */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha1SelfSubjectReviewStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha1SelfSubjectReviewStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha1SelfSubjectReviewStatus is not found in the empty JSON string", V1alpha1SelfSubjectReviewStatus.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha1SelfSubjectReviewStatus.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1SelfSubjectReviewStatus` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1SelfSubjectReviewStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `userInfo` if (jsonObj.get("userInfo") != null && !jsonObj.get("userInfo").isJsonNull()) { - V1UserInfo.validateJsonObject(jsonObj.getAsJsonObject("userInfo")); + V1UserInfo.validateJsonElement(jsonObj.get("userInfo")); } } @@ -177,9 +176,9 @@ public void write(JsonWriter out, V1alpha1SelfSubjectReviewStatus value) throws @Override public V1alpha1SelfSubjectReviewStatus read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -206,3 +205,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ServerStorageVersion.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ServerStorageVersion.java index 0cafc955bd..2173f0e8d9 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ServerStorageVersion.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ServerStorageVersion.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -43,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -51,7 +51,7 @@ /** * An API server instance reports the version it can decode and the version it encodes objects to when persisting objects in the backend. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha1ServerStorageVersion { public static final String SERIALIZED_NAME_API_SERVER_I_D = "apiServerID"; @SerializedName(SERIALIZED_NAME_API_SERVER_I_D) @@ -59,7 +59,7 @@ public class V1alpha1ServerStorageVersion { public static final String SERIALIZED_NAME_DECODABLE_VERSIONS = "decodableVersions"; @SerializedName(SERIALIZED_NAME_DECODABLE_VERSIONS) - private List decodableVersions; + private List decodableVersions = new ArrayList<>(); public static final String SERIALIZED_NAME_ENCODING_VERSION = "encodingVersion"; @SerializedName(SERIALIZED_NAME_ENCODING_VERSION) @@ -67,13 +67,12 @@ public class V1alpha1ServerStorageVersion { public static final String SERIALIZED_NAME_SERVED_VERSIONS = "servedVersions"; @SerializedName(SERIALIZED_NAME_SERVED_VERSIONS) - private List servedVersions; + private List servedVersions = new ArrayList<>(); public V1alpha1ServerStorageVersion() { } public V1alpha1ServerStorageVersion apiServerID(String apiServerID) { - this.apiServerID = apiServerID; return this; } @@ -87,14 +86,12 @@ public String getApiServerID() { return apiServerID; } - public void setApiServerID(String apiServerID) { this.apiServerID = apiServerID; } public V1alpha1ServerStorageVersion decodableVersions(List decodableVersions) { - this.decodableVersions = decodableVersions; return this; } @@ -116,14 +113,12 @@ public List getDecodableVersions() { return decodableVersions; } - public void setDecodableVersions(List decodableVersions) { this.decodableVersions = decodableVersions; } public V1alpha1ServerStorageVersion encodingVersion(String encodingVersion) { - this.encodingVersion = encodingVersion; return this; } @@ -137,14 +132,12 @@ public String getEncodingVersion() { return encodingVersion; } - public void setEncodingVersion(String encodingVersion) { this.encodingVersion = encodingVersion; } public V1alpha1ServerStorageVersion servedVersions(List servedVersions) { - this.servedVersions = servedVersions; return this; } @@ -166,7 +159,6 @@ public List getServedVersions() { return servedVersions; } - public void setServedVersions(List servedVersions) { this.servedVersions = servedVersions; } @@ -233,37 +225,38 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha1ServerStorageVersion + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha1ServerStorageVersion */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha1ServerStorageVersion.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha1ServerStorageVersion.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha1ServerStorageVersion is not found in the empty JSON string", V1alpha1ServerStorageVersion.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha1ServerStorageVersion.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1ServerStorageVersion` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1ServerStorageVersion` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiServerID") != null && !jsonObj.get("apiServerID").isJsonNull()) && !jsonObj.get("apiServerID").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiServerID` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiServerID").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("decodableVersions") != null && !jsonObj.get("decodableVersions").isJsonArray()) { + if (jsonObj.get("decodableVersions") != null && !jsonObj.get("decodableVersions").isJsonNull() && !jsonObj.get("decodableVersions").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `decodableVersions` to be an array in the JSON string but got `%s`", jsonObj.get("decodableVersions").toString())); } if ((jsonObj.get("encodingVersion") != null && !jsonObj.get("encodingVersion").isJsonNull()) && !jsonObj.get("encodingVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `encodingVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("encodingVersion").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("servedVersions") != null && !jsonObj.get("servedVersions").isJsonArray()) { + if (jsonObj.get("servedVersions") != null && !jsonObj.get("servedVersions").isJsonNull() && !jsonObj.get("servedVersions").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `servedVersions` to be an array in the JSON string but got `%s`", jsonObj.get("servedVersions").toString())); } } @@ -288,9 +281,9 @@ public void write(JsonWriter out, V1alpha1ServerStorageVersion value) throws IOE @Override public V1alpha1ServerStorageVersion read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -317,3 +310,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ServiceCIDR.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ServiceCIDR.java index 32f3e2f5d0..c0a01fbd32 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ServiceCIDR.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ServiceCIDR.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1alpha1ServiceCIDRSpec; import io.kubernetes.client.openapi.models.V1alpha1ServiceCIDRStatus; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * ServiceCIDR defines a range of IP addresses using CIDR format (e.g. 192.168.0.0/24 or 2001:db2::/64). This range is used to allocate ClusterIPs to Service objects. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha1ServiceCIDR implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -78,7 +78,6 @@ public V1alpha1ServiceCIDR() { } public V1alpha1ServiceCIDR apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -92,14 +91,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1alpha1ServiceCIDR kind(String kind) { - this.kind = kind; return this; } @@ -113,14 +110,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1alpha1ServiceCIDR metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -134,14 +129,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V1alpha1ServiceCIDR spec(V1alpha1ServiceCIDRSpec spec) { - this.spec = spec; return this; } @@ -155,14 +148,12 @@ public V1alpha1ServiceCIDRSpec getSpec() { return spec; } - public void setSpec(V1alpha1ServiceCIDRSpec spec) { this.spec = spec; } public V1alpha1ServiceCIDR status(V1alpha1ServiceCIDRStatus status) { - this.status = status; return this; } @@ -176,7 +167,6 @@ public V1alpha1ServiceCIDRStatus getStatus() { return status; } - public void setStatus(V1alpha1ServiceCIDRStatus status) { this.status = status; } @@ -246,25 +236,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha1ServiceCIDR + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha1ServiceCIDR */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha1ServiceCIDR.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha1ServiceCIDR.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha1ServiceCIDR is not found in the empty JSON string", V1alpha1ServiceCIDR.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha1ServiceCIDR.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1ServiceCIDR` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1ServiceCIDR` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -273,15 +264,15 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } // validate the optional field `spec` if (jsonObj.get("spec") != null && !jsonObj.get("spec").isJsonNull()) { - V1alpha1ServiceCIDRSpec.validateJsonObject(jsonObj.getAsJsonObject("spec")); + V1alpha1ServiceCIDRSpec.validateJsonElement(jsonObj.get("spec")); } // validate the optional field `status` if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { - V1alpha1ServiceCIDRStatus.validateJsonObject(jsonObj.getAsJsonObject("status")); + V1alpha1ServiceCIDRStatus.validateJsonElement(jsonObj.get("status")); } } @@ -305,9 +296,9 @@ public void write(JsonWriter out, V1alpha1ServiceCIDR value) throws IOException @Override public V1alpha1ServiceCIDR read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -334,3 +325,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ServiceCIDRList.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ServiceCIDRList.java index f32b2f2609..5fd78eb029 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ServiceCIDRList.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ServiceCIDRList.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1alpha1ServiceCIDR; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * ServiceCIDRList contains a list of ServiceCIDR objects. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha1ServiceCIDRList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -75,7 +75,6 @@ public V1alpha1ServiceCIDRList() { } public V1alpha1ServiceCIDRList apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -89,14 +88,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1alpha1ServiceCIDRList items(List items) { - this.items = items; return this; } @@ -118,14 +115,12 @@ public List getItems() { return items; } - public void setItems(List items) { this.items = items; } public V1alpha1ServiceCIDRList kind(String kind) { - this.kind = kind; return this; } @@ -139,14 +134,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1alpha1ServiceCIDRList metadata(V1ListMeta metadata) { - this.metadata = metadata; return this; } @@ -160,7 +153,6 @@ public V1ListMeta getMetadata() { return metadata; } - public void setMetadata(V1ListMeta metadata) { this.metadata = metadata; } @@ -228,32 +220,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha1ServiceCIDRList + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha1ServiceCIDRList */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha1ServiceCIDRList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha1ServiceCIDRList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha1ServiceCIDRList is not found in the empty JSON string", V1alpha1ServiceCIDRList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha1ServiceCIDRList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1ServiceCIDRList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1ServiceCIDRList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1alpha1ServiceCIDRList.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -265,14 +258,14 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); // validate the required field `items` (array) for (int i = 0; i < jsonArrayitems.size(); i++) { - V1alpha1ServiceCIDR.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject()); + V1alpha1ServiceCIDR.validateJsonElement(jsonArrayitems.get(i)); }; if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ListMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ListMeta.validateJsonElement(jsonObj.get("metadata")); } } @@ -296,9 +289,9 @@ public void write(JsonWriter out, V1alpha1ServiceCIDRList value) throws IOExcept @Override public V1alpha1ServiceCIDRList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -325,3 +318,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ServiceCIDRSpec.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ServiceCIDRSpec.java index 25b6340bb5..c3f7f49e0e 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ServiceCIDRSpec.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ServiceCIDRSpec.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -43,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -51,17 +51,16 @@ /** * ServiceCIDRSpec define the CIDRs the user wants to use for allocating ClusterIPs for Services. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha1ServiceCIDRSpec { public static final String SERIALIZED_NAME_CIDRS = "cidrs"; @SerializedName(SERIALIZED_NAME_CIDRS) - private List cidrs; + private List cidrs = new ArrayList<>(); public V1alpha1ServiceCIDRSpec() { } public V1alpha1ServiceCIDRSpec cidrs(List cidrs) { - this.cidrs = cidrs; return this; } @@ -83,7 +82,6 @@ public List getCidrs() { return cidrs; } - public void setCidrs(List cidrs) { this.cidrs = cidrs; } @@ -141,27 +139,28 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha1ServiceCIDRSpec + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha1ServiceCIDRSpec */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha1ServiceCIDRSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha1ServiceCIDRSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha1ServiceCIDRSpec is not found in the empty JSON string", V1alpha1ServiceCIDRSpec.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha1ServiceCIDRSpec.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1ServiceCIDRSpec` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1ServiceCIDRSpec` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the optional json data is an array if present - if (jsonObj.get("cidrs") != null && !jsonObj.get("cidrs").isJsonArray()) { + if (jsonObj.get("cidrs") != null && !jsonObj.get("cidrs").isJsonNull() && !jsonObj.get("cidrs").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `cidrs` to be an array in the JSON string but got `%s`", jsonObj.get("cidrs").toString())); } } @@ -186,9 +185,9 @@ public void write(JsonWriter out, V1alpha1ServiceCIDRSpec value) throws IOExcept @Override public V1alpha1ServiceCIDRSpec read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -215,3 +214,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ServiceCIDRStatus.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ServiceCIDRStatus.java index 0c176ce090..3a554c3d3f 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ServiceCIDRStatus.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ServiceCIDRStatus.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1Condition; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,17 +52,16 @@ /** * ServiceCIDRStatus describes the current state of the ServiceCIDR. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha1ServiceCIDRStatus { public static final String SERIALIZED_NAME_CONDITIONS = "conditions"; @SerializedName(SERIALIZED_NAME_CONDITIONS) - private List conditions; + private List conditions = new ArrayList<>(); public V1alpha1ServiceCIDRStatus() { } public V1alpha1ServiceCIDRStatus conditions(List conditions) { - this.conditions = conditions; return this; } @@ -84,7 +83,6 @@ public List getConditions() { return conditions; } - public void setConditions(List conditions) { this.conditions = conditions; } @@ -142,25 +140,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha1ServiceCIDRStatus + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha1ServiceCIDRStatus */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha1ServiceCIDRStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha1ServiceCIDRStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha1ServiceCIDRStatus is not found in the empty JSON string", V1alpha1ServiceCIDRStatus.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha1ServiceCIDRStatus.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1ServiceCIDRStatus` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1ServiceCIDRStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (jsonObj.get("conditions") != null && !jsonObj.get("conditions").isJsonNull()) { JsonArray jsonArrayconditions = jsonObj.getAsJsonArray("conditions"); if (jsonArrayconditions != null) { @@ -171,7 +170,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `conditions` (array) for (int i = 0; i < jsonArrayconditions.size(); i++) { - V1Condition.validateJsonObject(jsonArrayconditions.get(i).getAsJsonObject()); + V1Condition.validateJsonElement(jsonArrayconditions.get(i)); }; } } @@ -197,9 +196,9 @@ public void write(JsonWriter out, V1alpha1ServiceCIDRStatus value) throws IOExce @Override public V1alpha1ServiceCIDRStatus read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -226,3 +225,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1StorageVersion.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1StorageVersion.java index 13e4ef1658..103473df81 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1StorageVersion.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1StorageVersion.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1ObjectMeta; import io.kubernetes.client.openapi.models.V1alpha1StorageVersionStatus; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -43,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -51,7 +51,7 @@ /** * Storage version of a specific resource. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha1StorageVersion implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -77,7 +77,6 @@ public V1alpha1StorageVersion() { } public V1alpha1StorageVersion apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -91,14 +90,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1alpha1StorageVersion kind(String kind) { - this.kind = kind; return this; } @@ -112,14 +109,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1alpha1StorageVersion metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -133,14 +128,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V1alpha1StorageVersion spec(Object spec) { - this.spec = spec; return this; } @@ -154,14 +147,12 @@ public Object getSpec() { return spec; } - public void setSpec(Object spec) { this.spec = spec; } public V1alpha1StorageVersion status(V1alpha1StorageVersionStatus status) { - this.status = status; return this; } @@ -175,7 +166,6 @@ public V1alpha1StorageVersionStatus getStatus() { return status; } - public void setStatus(V1alpha1StorageVersionStatus status) { this.status = status; } @@ -247,32 +237,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha1StorageVersion + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha1StorageVersion */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha1StorageVersion.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha1StorageVersion.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha1StorageVersion is not found in the empty JSON string", V1alpha1StorageVersion.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha1StorageVersion.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1StorageVersion` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1StorageVersion` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1alpha1StorageVersion.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -281,10 +272,10 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } // validate the required field `status` - V1alpha1StorageVersionStatus.validateJsonObject(jsonObj.getAsJsonObject("status")); + V1alpha1StorageVersionStatus.validateJsonElement(jsonObj.get("status")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -307,9 +298,9 @@ public void write(JsonWriter out, V1alpha1StorageVersion value) throws IOExcepti @Override public V1alpha1StorageVersion read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -336,3 +327,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1StorageVersionCondition.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1StorageVersionCondition.java index c18ef9509f..2b7c7e1666 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1StorageVersionCondition.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1StorageVersionCondition.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * Describes the state of the storageVersion at a certain point. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha1StorageVersionCondition { public static final String SERIALIZED_NAME_LAST_TRANSITION_TIME = "lastTransitionTime"; @SerializedName(SERIALIZED_NAME_LAST_TRANSITION_TIME) @@ -80,7 +80,6 @@ public V1alpha1StorageVersionCondition() { } public V1alpha1StorageVersionCondition lastTransitionTime(OffsetDateTime lastTransitionTime) { - this.lastTransitionTime = lastTransitionTime; return this; } @@ -94,14 +93,12 @@ public OffsetDateTime getLastTransitionTime() { return lastTransitionTime; } - public void setLastTransitionTime(OffsetDateTime lastTransitionTime) { this.lastTransitionTime = lastTransitionTime; } public V1alpha1StorageVersionCondition message(String message) { - this.message = message; return this; } @@ -115,14 +112,12 @@ public String getMessage() { return message; } - public void setMessage(String message) { this.message = message; } public V1alpha1StorageVersionCondition observedGeneration(Long observedGeneration) { - this.observedGeneration = observedGeneration; return this; } @@ -136,14 +131,12 @@ public Long getObservedGeneration() { return observedGeneration; } - public void setObservedGeneration(Long observedGeneration) { this.observedGeneration = observedGeneration; } public V1alpha1StorageVersionCondition reason(String reason) { - this.reason = reason; return this; } @@ -157,14 +150,12 @@ public String getReason() { return reason; } - public void setReason(String reason) { this.reason = reason; } public V1alpha1StorageVersionCondition status(String status) { - this.status = status; return this; } @@ -178,14 +169,12 @@ public String getStatus() { return status; } - public void setStatus(String status) { this.status = status; } public V1alpha1StorageVersionCondition type(String type) { - this.type = type; return this; } @@ -199,7 +188,6 @@ public String getType() { return type; } - public void setType(String type) { this.type = type; } @@ -276,32 +264,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha1StorageVersionCondition + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha1StorageVersionCondition */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha1StorageVersionCondition.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha1StorageVersionCondition.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha1StorageVersionCondition is not found in the empty JSON string", V1alpha1StorageVersionCondition.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha1StorageVersionCondition.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1StorageVersionCondition` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1StorageVersionCondition` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1alpha1StorageVersionCondition.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("message").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); } @@ -336,9 +325,9 @@ public void write(JsonWriter out, V1alpha1StorageVersionCondition value) throws @Override public V1alpha1StorageVersionCondition read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -365,3 +354,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1StorageVersionList.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1StorageVersionList.java index 14838c4650..c74a8a4df1 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1StorageVersionList.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1StorageVersionList.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1alpha1StorageVersion; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * A list of StorageVersions. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha1StorageVersionList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -75,7 +75,6 @@ public V1alpha1StorageVersionList() { } public V1alpha1StorageVersionList apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -89,14 +88,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1alpha1StorageVersionList items(List items) { - this.items = items; return this; } @@ -118,14 +115,12 @@ public List getItems() { return items; } - public void setItems(List items) { this.items = items; } public V1alpha1StorageVersionList kind(String kind) { - this.kind = kind; return this; } @@ -139,14 +134,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1alpha1StorageVersionList metadata(V1ListMeta metadata) { - this.metadata = metadata; return this; } @@ -160,7 +153,6 @@ public V1ListMeta getMetadata() { return metadata; } - public void setMetadata(V1ListMeta metadata) { this.metadata = metadata; } @@ -228,32 +220,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha1StorageVersionList + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha1StorageVersionList */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha1StorageVersionList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha1StorageVersionList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha1StorageVersionList is not found in the empty JSON string", V1alpha1StorageVersionList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha1StorageVersionList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1StorageVersionList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1StorageVersionList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1alpha1StorageVersionList.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -265,14 +258,14 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); // validate the required field `items` (array) for (int i = 0; i < jsonArrayitems.size(); i++) { - V1alpha1StorageVersion.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject()); + V1alpha1StorageVersion.validateJsonElement(jsonArrayitems.get(i)); }; if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ListMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ListMeta.validateJsonElement(jsonObj.get("metadata")); } } @@ -296,9 +289,9 @@ public void write(JsonWriter out, V1alpha1StorageVersionList value) throws IOExc @Override public V1alpha1StorageVersionList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -325,3 +318,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1StorageVersionMigration.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1StorageVersionMigration.java index 649dfb0378..b5ded17683 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1StorageVersionMigration.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1StorageVersionMigration.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1alpha1StorageVersionMigrationSpec; import io.kubernetes.client.openapi.models.V1alpha1StorageVersionMigrationStatus; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * StorageVersionMigration represents a migration of stored data to the latest storage version. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha1StorageVersionMigration implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -78,7 +78,6 @@ public V1alpha1StorageVersionMigration() { } public V1alpha1StorageVersionMigration apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -92,14 +91,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1alpha1StorageVersionMigration kind(String kind) { - this.kind = kind; return this; } @@ -113,14 +110,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1alpha1StorageVersionMigration metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -134,14 +129,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V1alpha1StorageVersionMigration spec(V1alpha1StorageVersionMigrationSpec spec) { - this.spec = spec; return this; } @@ -155,14 +148,12 @@ public V1alpha1StorageVersionMigrationSpec getSpec() { return spec; } - public void setSpec(V1alpha1StorageVersionMigrationSpec spec) { this.spec = spec; } public V1alpha1StorageVersionMigration status(V1alpha1StorageVersionMigrationStatus status) { - this.status = status; return this; } @@ -176,7 +167,6 @@ public V1alpha1StorageVersionMigrationStatus getStatus() { return status; } - public void setStatus(V1alpha1StorageVersionMigrationStatus status) { this.status = status; } @@ -246,25 +236,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha1StorageVersionMigration + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha1StorageVersionMigration */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha1StorageVersionMigration.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha1StorageVersionMigration.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha1StorageVersionMigration is not found in the empty JSON string", V1alpha1StorageVersionMigration.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha1StorageVersionMigration.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1StorageVersionMigration` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1StorageVersionMigration` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -273,15 +264,15 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } // validate the optional field `spec` if (jsonObj.get("spec") != null && !jsonObj.get("spec").isJsonNull()) { - V1alpha1StorageVersionMigrationSpec.validateJsonObject(jsonObj.getAsJsonObject("spec")); + V1alpha1StorageVersionMigrationSpec.validateJsonElement(jsonObj.get("spec")); } // validate the optional field `status` if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { - V1alpha1StorageVersionMigrationStatus.validateJsonObject(jsonObj.getAsJsonObject("status")); + V1alpha1StorageVersionMigrationStatus.validateJsonElement(jsonObj.get("status")); } } @@ -305,9 +296,9 @@ public void write(JsonWriter out, V1alpha1StorageVersionMigration value) throws @Override public V1alpha1StorageVersionMigration read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -334,3 +325,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1StorageVersionMigrationList.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1StorageVersionMigrationList.java index 2ace89f251..942b17fd90 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1StorageVersionMigrationList.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1StorageVersionMigrationList.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1alpha1StorageVersionMigration; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * StorageVersionMigrationList is a collection of storage version migrations. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha1StorageVersionMigrationList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -75,7 +75,6 @@ public V1alpha1StorageVersionMigrationList() { } public V1alpha1StorageVersionMigrationList apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -89,14 +88,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1alpha1StorageVersionMigrationList items(List items) { - this.items = items; return this; } @@ -118,14 +115,12 @@ public List getItems() { return items; } - public void setItems(List items) { this.items = items; } public V1alpha1StorageVersionMigrationList kind(String kind) { - this.kind = kind; return this; } @@ -139,14 +134,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1alpha1StorageVersionMigrationList metadata(V1ListMeta metadata) { - this.metadata = metadata; return this; } @@ -160,7 +153,6 @@ public V1ListMeta getMetadata() { return metadata; } - public void setMetadata(V1ListMeta metadata) { this.metadata = metadata; } @@ -228,32 +220,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha1StorageVersionMigrationList + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha1StorageVersionMigrationList */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha1StorageVersionMigrationList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha1StorageVersionMigrationList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha1StorageVersionMigrationList is not found in the empty JSON string", V1alpha1StorageVersionMigrationList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha1StorageVersionMigrationList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1StorageVersionMigrationList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1StorageVersionMigrationList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1alpha1StorageVersionMigrationList.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -265,14 +258,14 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); // validate the required field `items` (array) for (int i = 0; i < jsonArrayitems.size(); i++) { - V1alpha1StorageVersionMigration.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject()); + V1alpha1StorageVersionMigration.validateJsonElement(jsonArrayitems.get(i)); }; if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ListMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ListMeta.validateJsonElement(jsonObj.get("metadata")); } } @@ -296,9 +289,9 @@ public void write(JsonWriter out, V1alpha1StorageVersionMigrationList value) thr @Override public V1alpha1StorageVersionMigrationList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -325,3 +318,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1StorageVersionMigrationSpec.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1StorageVersionMigrationSpec.java index ce99f3e2ca..73fef9773d 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1StorageVersionMigrationSpec.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1StorageVersionMigrationSpec.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.openapi.models.V1alpha1GroupVersionResource; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * Spec of the storage version migration. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha1StorageVersionMigrationSpec { public static final String SERIALIZED_NAME_CONTINUE_TOKEN = "continueToken"; @SerializedName(SERIALIZED_NAME_CONTINUE_TOKEN) @@ -64,7 +64,6 @@ public V1alpha1StorageVersionMigrationSpec() { } public V1alpha1StorageVersionMigrationSpec continueToken(String continueToken) { - this.continueToken = continueToken; return this; } @@ -78,14 +77,12 @@ public String getContinueToken() { return continueToken; } - public void setContinueToken(String continueToken) { this.continueToken = continueToken; } public V1alpha1StorageVersionMigrationSpec resource(V1alpha1GroupVersionResource resource) { - this.resource = resource; return this; } @@ -99,7 +96,6 @@ public V1alpha1GroupVersionResource getResource() { return resource; } - public void setResource(V1alpha1GroupVersionResource resource) { this.resource = resource; } @@ -161,37 +157,38 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha1StorageVersionMigrationSpec + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha1StorageVersionMigrationSpec */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha1StorageVersionMigrationSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha1StorageVersionMigrationSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha1StorageVersionMigrationSpec is not found in the empty JSON string", V1alpha1StorageVersionMigrationSpec.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha1StorageVersionMigrationSpec.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1StorageVersionMigrationSpec` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1StorageVersionMigrationSpec` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1alpha1StorageVersionMigrationSpec.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("continueToken") != null && !jsonObj.get("continueToken").isJsonNull()) && !jsonObj.get("continueToken").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `continueToken` to be a primitive type in the JSON string but got `%s`", jsonObj.get("continueToken").toString())); } // validate the required field `resource` - V1alpha1GroupVersionResource.validateJsonObject(jsonObj.getAsJsonObject("resource")); + V1alpha1GroupVersionResource.validateJsonElement(jsonObj.get("resource")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -214,9 +211,9 @@ public void write(JsonWriter out, V1alpha1StorageVersionMigrationSpec value) thr @Override public V1alpha1StorageVersionMigrationSpec read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -243,3 +240,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1StorageVersionMigrationStatus.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1StorageVersionMigrationStatus.java index 4efb1846e7..5ed7bff4c0 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1StorageVersionMigrationStatus.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1StorageVersionMigrationStatus.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1alpha1MigrationCondition; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,11 +52,11 @@ /** * Status of the storage version migration. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha1StorageVersionMigrationStatus { public static final String SERIALIZED_NAME_CONDITIONS = "conditions"; @SerializedName(SERIALIZED_NAME_CONDITIONS) - private List conditions; + private List conditions = new ArrayList<>(); public static final String SERIALIZED_NAME_RESOURCE_VERSION = "resourceVersion"; @SerializedName(SERIALIZED_NAME_RESOURCE_VERSION) @@ -66,7 +66,6 @@ public V1alpha1StorageVersionMigrationStatus() { } public V1alpha1StorageVersionMigrationStatus conditions(List conditions) { - this.conditions = conditions; return this; } @@ -88,14 +87,12 @@ public List getConditions() { return conditions; } - public void setConditions(List conditions) { this.conditions = conditions; } public V1alpha1StorageVersionMigrationStatus resourceVersion(String resourceVersion) { - this.resourceVersion = resourceVersion; return this; } @@ -109,7 +106,6 @@ public String getResourceVersion() { return resourceVersion; } - public void setResourceVersion(String resourceVersion) { this.resourceVersion = resourceVersion; } @@ -170,25 +166,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha1StorageVersionMigrationStatus + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha1StorageVersionMigrationStatus */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha1StorageVersionMigrationStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha1StorageVersionMigrationStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha1StorageVersionMigrationStatus is not found in the empty JSON string", V1alpha1StorageVersionMigrationStatus.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha1StorageVersionMigrationStatus.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1StorageVersionMigrationStatus` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1StorageVersionMigrationStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (jsonObj.get("conditions") != null && !jsonObj.get("conditions").isJsonNull()) { JsonArray jsonArrayconditions = jsonObj.getAsJsonArray("conditions"); if (jsonArrayconditions != null) { @@ -199,7 +196,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `conditions` (array) for (int i = 0; i < jsonArrayconditions.size(); i++) { - V1alpha1MigrationCondition.validateJsonObject(jsonArrayconditions.get(i).getAsJsonObject()); + V1alpha1MigrationCondition.validateJsonElement(jsonArrayconditions.get(i)); }; } } @@ -228,9 +225,9 @@ public void write(JsonWriter out, V1alpha1StorageVersionMigrationStatus value) t @Override public V1alpha1StorageVersionMigrationStatus read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -257,3 +254,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1StorageVersionStatus.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1StorageVersionStatus.java index 5c0aa7fdad..bd019d7df7 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1StorageVersionStatus.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1StorageVersionStatus.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1alpha1StorageVersionCondition; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * API server instances report the versions they can decode and the version they encode objects to when persisting objects in the backend. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha1StorageVersionStatus { public static final String SERIALIZED_NAME_COMMON_ENCODING_VERSION = "commonEncodingVersion"; @SerializedName(SERIALIZED_NAME_COMMON_ENCODING_VERSION) @@ -61,17 +61,16 @@ public class V1alpha1StorageVersionStatus { public static final String SERIALIZED_NAME_CONDITIONS = "conditions"; @SerializedName(SERIALIZED_NAME_CONDITIONS) - private List conditions; + private List conditions = new ArrayList<>(); public static final String SERIALIZED_NAME_STORAGE_VERSIONS = "storageVersions"; @SerializedName(SERIALIZED_NAME_STORAGE_VERSIONS) - private List storageVersions; + private List storageVersions = new ArrayList<>(); public V1alpha1StorageVersionStatus() { } public V1alpha1StorageVersionStatus commonEncodingVersion(String commonEncodingVersion) { - this.commonEncodingVersion = commonEncodingVersion; return this; } @@ -85,14 +84,12 @@ public String getCommonEncodingVersion() { return commonEncodingVersion; } - public void setCommonEncodingVersion(String commonEncodingVersion) { this.commonEncodingVersion = commonEncodingVersion; } public V1alpha1StorageVersionStatus conditions(List conditions) { - this.conditions = conditions; return this; } @@ -114,14 +111,12 @@ public List getConditions() { return conditions; } - public void setConditions(List conditions) { this.conditions = conditions; } public V1alpha1StorageVersionStatus storageVersions(List storageVersions) { - this.storageVersions = storageVersions; return this; } @@ -143,7 +138,6 @@ public List getStorageVersions() { return storageVersions; } - public void setStorageVersions(List storageVersions) { this.storageVersions = storageVersions; } @@ -207,25 +201,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha1StorageVersionStatus + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha1StorageVersionStatus */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha1StorageVersionStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha1StorageVersionStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha1StorageVersionStatus is not found in the empty JSON string", V1alpha1StorageVersionStatus.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha1StorageVersionStatus.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1StorageVersionStatus` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1StorageVersionStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("commonEncodingVersion") != null && !jsonObj.get("commonEncodingVersion").isJsonNull()) && !jsonObj.get("commonEncodingVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `commonEncodingVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("commonEncodingVersion").toString())); } @@ -239,7 +234,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `conditions` (array) for (int i = 0; i < jsonArrayconditions.size(); i++) { - V1alpha1StorageVersionCondition.validateJsonObject(jsonArrayconditions.get(i).getAsJsonObject()); + V1alpha1StorageVersionCondition.validateJsonElement(jsonArrayconditions.get(i)); }; } } @@ -253,7 +248,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `storageVersions` (array) for (int i = 0; i < jsonArraystorageVersions.size(); i++) { - V1alpha1ServerStorageVersion.validateJsonObject(jsonArraystorageVersions.get(i).getAsJsonObject()); + V1alpha1ServerStorageVersion.validateJsonElement(jsonArraystorageVersions.get(i)); }; } } @@ -279,9 +274,9 @@ public void write(JsonWriter out, V1alpha1StorageVersionStatus value) throws IOE @Override public V1alpha1StorageVersionStatus read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -308,3 +303,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1TypeChecking.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1TypeChecking.java index 01628a2632..2d3aaa56bf 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1TypeChecking.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1TypeChecking.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1alpha1ExpressionWarning; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,17 +52,16 @@ /** * TypeChecking contains results of type checking the expressions in the ValidatingAdmissionPolicy */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha1TypeChecking { public static final String SERIALIZED_NAME_EXPRESSION_WARNINGS = "expressionWarnings"; @SerializedName(SERIALIZED_NAME_EXPRESSION_WARNINGS) - private List expressionWarnings; + private List expressionWarnings = new ArrayList<>(); public V1alpha1TypeChecking() { } public V1alpha1TypeChecking expressionWarnings(List expressionWarnings) { - this.expressionWarnings = expressionWarnings; return this; } @@ -84,7 +83,6 @@ public List getExpressionWarnings() { return expressionWarnings; } - public void setExpressionWarnings(List expressionWarnings) { this.expressionWarnings = expressionWarnings; } @@ -142,25 +140,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha1TypeChecking + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha1TypeChecking */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha1TypeChecking.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha1TypeChecking.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha1TypeChecking is not found in the empty JSON string", V1alpha1TypeChecking.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha1TypeChecking.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1TypeChecking` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1TypeChecking` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (jsonObj.get("expressionWarnings") != null && !jsonObj.get("expressionWarnings").isJsonNull()) { JsonArray jsonArrayexpressionWarnings = jsonObj.getAsJsonArray("expressionWarnings"); if (jsonArrayexpressionWarnings != null) { @@ -171,7 +170,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `expressionWarnings` (array) for (int i = 0; i < jsonArrayexpressionWarnings.size(); i++) { - V1alpha1ExpressionWarning.validateJsonObject(jsonArrayexpressionWarnings.get(i).getAsJsonObject()); + V1alpha1ExpressionWarning.validateJsonElement(jsonArrayexpressionWarnings.get(i)); }; } } @@ -197,9 +196,9 @@ public void write(JsonWriter out, V1alpha1TypeChecking value) throws IOException @Override public V1alpha1TypeChecking read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -226,3 +225,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicy.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicy.java index 147b6e2e79..0074079a4c 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicy.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicy.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1alpha1ValidatingAdmissionPolicySpec; import io.kubernetes.client.openapi.models.V1alpha1ValidatingAdmissionPolicyStatus; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * ValidatingAdmissionPolicy describes the definition of an admission validation policy that accepts or rejects an object without changing it. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha1ValidatingAdmissionPolicy implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -78,7 +78,6 @@ public V1alpha1ValidatingAdmissionPolicy() { } public V1alpha1ValidatingAdmissionPolicy apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -92,14 +91,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1alpha1ValidatingAdmissionPolicy kind(String kind) { - this.kind = kind; return this; } @@ -113,14 +110,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1alpha1ValidatingAdmissionPolicy metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -134,14 +129,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V1alpha1ValidatingAdmissionPolicy spec(V1alpha1ValidatingAdmissionPolicySpec spec) { - this.spec = spec; return this; } @@ -155,14 +148,12 @@ public V1alpha1ValidatingAdmissionPolicySpec getSpec() { return spec; } - public void setSpec(V1alpha1ValidatingAdmissionPolicySpec spec) { this.spec = spec; } public V1alpha1ValidatingAdmissionPolicy status(V1alpha1ValidatingAdmissionPolicyStatus status) { - this.status = status; return this; } @@ -176,7 +167,6 @@ public V1alpha1ValidatingAdmissionPolicyStatus getStatus() { return status; } - public void setStatus(V1alpha1ValidatingAdmissionPolicyStatus status) { this.status = status; } @@ -246,25 +236,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha1ValidatingAdmissionPolicy + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha1ValidatingAdmissionPolicy */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha1ValidatingAdmissionPolicy.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha1ValidatingAdmissionPolicy.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha1ValidatingAdmissionPolicy is not found in the empty JSON string", V1alpha1ValidatingAdmissionPolicy.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha1ValidatingAdmissionPolicy.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1ValidatingAdmissionPolicy` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1ValidatingAdmissionPolicy` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -273,15 +264,15 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } // validate the optional field `spec` if (jsonObj.get("spec") != null && !jsonObj.get("spec").isJsonNull()) { - V1alpha1ValidatingAdmissionPolicySpec.validateJsonObject(jsonObj.getAsJsonObject("spec")); + V1alpha1ValidatingAdmissionPolicySpec.validateJsonElement(jsonObj.get("spec")); } // validate the optional field `status` if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { - V1alpha1ValidatingAdmissionPolicyStatus.validateJsonObject(jsonObj.getAsJsonObject("status")); + V1alpha1ValidatingAdmissionPolicyStatus.validateJsonElement(jsonObj.get("status")); } } @@ -305,9 +296,9 @@ public void write(JsonWriter out, V1alpha1ValidatingAdmissionPolicy value) throw @Override public V1alpha1ValidatingAdmissionPolicy read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -334,3 +325,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyBinding.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyBinding.java index a42d840a93..04e4595875 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyBinding.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyBinding.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1ObjectMeta; import io.kubernetes.client.openapi.models.V1alpha1ValidatingAdmissionPolicyBindingSpec; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -43,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -51,7 +51,7 @@ /** * ValidatingAdmissionPolicyBinding binds the ValidatingAdmissionPolicy with paramerized resources. ValidatingAdmissionPolicyBinding and parameter CRDs together define how cluster administrators configure policies for clusters. For a given admission request, each binding will cause its policy to be evaluated N times, where N is 1 for policies/bindings that don't use params, otherwise N is the number of parameters selected by the binding. The CEL expressions of a policy must have a computed CEL cost below the maximum CEL budget. Each evaluation of the policy is given an independent CEL cost budget. Adding/removing policies, bindings, or params can not affect whether a given (policy, binding, param) combination is within its own CEL budget. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha1ValidatingAdmissionPolicyBinding implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -73,7 +73,6 @@ public V1alpha1ValidatingAdmissionPolicyBinding() { } public V1alpha1ValidatingAdmissionPolicyBinding apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -87,14 +86,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1alpha1ValidatingAdmissionPolicyBinding kind(String kind) { - this.kind = kind; return this; } @@ -108,14 +105,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1alpha1ValidatingAdmissionPolicyBinding metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -129,14 +124,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V1alpha1ValidatingAdmissionPolicyBinding spec(V1alpha1ValidatingAdmissionPolicyBindingSpec spec) { - this.spec = spec; return this; } @@ -150,7 +143,6 @@ public V1alpha1ValidatingAdmissionPolicyBindingSpec getSpec() { return spec; } - public void setSpec(V1alpha1ValidatingAdmissionPolicyBindingSpec spec) { this.spec = spec; } @@ -217,25 +209,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha1ValidatingAdmissionPolicyBinding + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha1ValidatingAdmissionPolicyBinding */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha1ValidatingAdmissionPolicyBinding.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha1ValidatingAdmissionPolicyBinding.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha1ValidatingAdmissionPolicyBinding is not found in the empty JSON string", V1alpha1ValidatingAdmissionPolicyBinding.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha1ValidatingAdmissionPolicyBinding.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1ValidatingAdmissionPolicyBinding` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1ValidatingAdmissionPolicyBinding` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -244,11 +237,11 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } // validate the optional field `spec` if (jsonObj.get("spec") != null && !jsonObj.get("spec").isJsonNull()) { - V1alpha1ValidatingAdmissionPolicyBindingSpec.validateJsonObject(jsonObj.getAsJsonObject("spec")); + V1alpha1ValidatingAdmissionPolicyBindingSpec.validateJsonElement(jsonObj.get("spec")); } } @@ -272,9 +265,9 @@ public void write(JsonWriter out, V1alpha1ValidatingAdmissionPolicyBinding value @Override public V1alpha1ValidatingAdmissionPolicyBinding read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -301,3 +294,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyBindingList.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyBindingList.java index 5906549b0e..7f1b613a77 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyBindingList.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyBindingList.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1alpha1ValidatingAdmissionPolicyBinding; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * ValidatingAdmissionPolicyBindingList is a list of ValidatingAdmissionPolicyBinding. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha1ValidatingAdmissionPolicyBindingList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -61,7 +61,7 @@ public class V1alpha1ValidatingAdmissionPolicyBindingList implements io.kubernet public static final String SERIALIZED_NAME_ITEMS = "items"; @SerializedName(SERIALIZED_NAME_ITEMS) - private List items; + private List items = new ArrayList<>(); public static final String SERIALIZED_NAME_KIND = "kind"; @SerializedName(SERIALIZED_NAME_KIND) @@ -75,7 +75,6 @@ public V1alpha1ValidatingAdmissionPolicyBindingList() { } public V1alpha1ValidatingAdmissionPolicyBindingList apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -89,14 +88,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1alpha1ValidatingAdmissionPolicyBindingList items(List items) { - this.items = items; return this; } @@ -113,19 +110,17 @@ public V1alpha1ValidatingAdmissionPolicyBindingList addItemsItem(V1alpha1Validat * List of PolicyBinding. * @return items **/ - @jakarta.annotation.Nullable + @jakarta.annotation.Nonnull public List getItems() { return items; } - public void setItems(List items) { this.items = items; } public V1alpha1ValidatingAdmissionPolicyBindingList kind(String kind) { - this.kind = kind; return this; } @@ -139,14 +134,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1alpha1ValidatingAdmissionPolicyBindingList metadata(V1ListMeta metadata) { - this.metadata = metadata; return this; } @@ -160,7 +153,6 @@ public V1ListMeta getMetadata() { return metadata; } - public void setMetadata(V1ListMeta metadata) { this.metadata = metadata; } @@ -224,51 +216,56 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("items"); } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha1ValidatingAdmissionPolicyBindingList + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha1ValidatingAdmissionPolicyBindingList */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha1ValidatingAdmissionPolicyBindingList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha1ValidatingAdmissionPolicyBindingList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha1ValidatingAdmissionPolicyBindingList is not found in the empty JSON string", V1alpha1ValidatingAdmissionPolicyBindingList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha1ValidatingAdmissionPolicyBindingList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1ValidatingAdmissionPolicyBindingList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1ValidatingAdmissionPolicyBindingList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : V1alpha1ValidatingAdmissionPolicyBindingList.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } - if (jsonObj.get("items") != null && !jsonObj.get("items").isJsonNull()) { - JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); - if (jsonArrayitems != null) { - // ensure the json data is an array - if (!jsonObj.get("items").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `items` to be an array in the JSON string but got `%s`", jsonObj.get("items").toString())); - } - - // validate the optional field `items` (array) - for (int i = 0; i < jsonArrayitems.size(); i++) { - V1alpha1ValidatingAdmissionPolicyBinding.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject()); - }; - } + // ensure the json data is an array + if (!jsonObj.get("items").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `items` to be an array in the JSON string but got `%s`", jsonObj.get("items").toString())); } + + JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); + // validate the required field `items` (array) + for (int i = 0; i < jsonArrayitems.size(); i++) { + V1alpha1ValidatingAdmissionPolicyBinding.validateJsonElement(jsonArrayitems.get(i)); + }; if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ListMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ListMeta.validateJsonElement(jsonObj.get("metadata")); } } @@ -292,9 +289,9 @@ public void write(JsonWriter out, V1alpha1ValidatingAdmissionPolicyBindingList v @Override public V1alpha1ValidatingAdmissionPolicyBindingList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -321,3 +318,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyBindingSpec.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyBindingSpec.java index 4dfb68a265..5d8d791e84 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyBindingSpec.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyBindingSpec.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1alpha1ParamRef; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * ValidatingAdmissionPolicyBindingSpec is the specification of the ValidatingAdmissionPolicyBinding. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha1ValidatingAdmissionPolicyBindingSpec { public static final String SERIALIZED_NAME_MATCH_RESOURCES = "matchResources"; @SerializedName(SERIALIZED_NAME_MATCH_RESOURCES) @@ -69,13 +69,12 @@ public class V1alpha1ValidatingAdmissionPolicyBindingSpec { public static final String SERIALIZED_NAME_VALIDATION_ACTIONS = "validationActions"; @SerializedName(SERIALIZED_NAME_VALIDATION_ACTIONS) - private List validationActions; + private List validationActions = new ArrayList<>(); public V1alpha1ValidatingAdmissionPolicyBindingSpec() { } public V1alpha1ValidatingAdmissionPolicyBindingSpec matchResources(V1alpha1MatchResources matchResources) { - this.matchResources = matchResources; return this; } @@ -89,14 +88,12 @@ public V1alpha1MatchResources getMatchResources() { return matchResources; } - public void setMatchResources(V1alpha1MatchResources matchResources) { this.matchResources = matchResources; } public V1alpha1ValidatingAdmissionPolicyBindingSpec paramRef(V1alpha1ParamRef paramRef) { - this.paramRef = paramRef; return this; } @@ -110,14 +107,12 @@ public V1alpha1ParamRef getParamRef() { return paramRef; } - public void setParamRef(V1alpha1ParamRef paramRef) { this.paramRef = paramRef; } public V1alpha1ValidatingAdmissionPolicyBindingSpec policyName(String policyName) { - this.policyName = policyName; return this; } @@ -131,14 +126,12 @@ public String getPolicyName() { return policyName; } - public void setPolicyName(String policyName) { this.policyName = policyName; } public V1alpha1ValidatingAdmissionPolicyBindingSpec validationActions(List validationActions) { - this.validationActions = validationActions; return this; } @@ -160,7 +153,6 @@ public List getValidationActions() { return validationActions; } - public void setValidationActions(List validationActions) { this.validationActions = validationActions; } @@ -227,38 +219,39 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha1ValidatingAdmissionPolicyBindingSpec + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha1ValidatingAdmissionPolicyBindingSpec */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha1ValidatingAdmissionPolicyBindingSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha1ValidatingAdmissionPolicyBindingSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha1ValidatingAdmissionPolicyBindingSpec is not found in the empty JSON string", V1alpha1ValidatingAdmissionPolicyBindingSpec.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha1ValidatingAdmissionPolicyBindingSpec.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1ValidatingAdmissionPolicyBindingSpec` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1ValidatingAdmissionPolicyBindingSpec` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `matchResources` if (jsonObj.get("matchResources") != null && !jsonObj.get("matchResources").isJsonNull()) { - V1alpha1MatchResources.validateJsonObject(jsonObj.getAsJsonObject("matchResources")); + V1alpha1MatchResources.validateJsonElement(jsonObj.get("matchResources")); } // validate the optional field `paramRef` if (jsonObj.get("paramRef") != null && !jsonObj.get("paramRef").isJsonNull()) { - V1alpha1ParamRef.validateJsonObject(jsonObj.getAsJsonObject("paramRef")); + V1alpha1ParamRef.validateJsonElement(jsonObj.get("paramRef")); } if ((jsonObj.get("policyName") != null && !jsonObj.get("policyName").isJsonNull()) && !jsonObj.get("policyName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `policyName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("policyName").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("validationActions") != null && !jsonObj.get("validationActions").isJsonArray()) { + if (jsonObj.get("validationActions") != null && !jsonObj.get("validationActions").isJsonNull() && !jsonObj.get("validationActions").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `validationActions` to be an array in the JSON string but got `%s`", jsonObj.get("validationActions").toString())); } } @@ -283,9 +276,9 @@ public void write(JsonWriter out, V1alpha1ValidatingAdmissionPolicyBindingSpec v @Override public V1alpha1ValidatingAdmissionPolicyBindingSpec read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -312,3 +305,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyList.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyList.java index 36c72ad10a..2bfe7c2151 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyList.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyList.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1alpha1ValidatingAdmissionPolicy; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * ValidatingAdmissionPolicyList is a list of ValidatingAdmissionPolicy. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha1ValidatingAdmissionPolicyList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -61,7 +61,7 @@ public class V1alpha1ValidatingAdmissionPolicyList implements io.kubernetes.clie public static final String SERIALIZED_NAME_ITEMS = "items"; @SerializedName(SERIALIZED_NAME_ITEMS) - private List items; + private List items = new ArrayList<>(); public static final String SERIALIZED_NAME_KIND = "kind"; @SerializedName(SERIALIZED_NAME_KIND) @@ -75,7 +75,6 @@ public V1alpha1ValidatingAdmissionPolicyList() { } public V1alpha1ValidatingAdmissionPolicyList apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -89,14 +88,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1alpha1ValidatingAdmissionPolicyList items(List items) { - this.items = items; return this; } @@ -113,19 +110,17 @@ public V1alpha1ValidatingAdmissionPolicyList addItemsItem(V1alpha1ValidatingAdmi * List of ValidatingAdmissionPolicy. * @return items **/ - @jakarta.annotation.Nullable + @jakarta.annotation.Nonnull public List getItems() { return items; } - public void setItems(List items) { this.items = items; } public V1alpha1ValidatingAdmissionPolicyList kind(String kind) { - this.kind = kind; return this; } @@ -139,14 +134,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1alpha1ValidatingAdmissionPolicyList metadata(V1ListMeta metadata) { - this.metadata = metadata; return this; } @@ -160,7 +153,6 @@ public V1ListMeta getMetadata() { return metadata; } - public void setMetadata(V1ListMeta metadata) { this.metadata = metadata; } @@ -224,51 +216,56 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("items"); } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha1ValidatingAdmissionPolicyList + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha1ValidatingAdmissionPolicyList */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha1ValidatingAdmissionPolicyList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha1ValidatingAdmissionPolicyList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha1ValidatingAdmissionPolicyList is not found in the empty JSON string", V1alpha1ValidatingAdmissionPolicyList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha1ValidatingAdmissionPolicyList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1ValidatingAdmissionPolicyList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1ValidatingAdmissionPolicyList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : V1alpha1ValidatingAdmissionPolicyList.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } - if (jsonObj.get("items") != null && !jsonObj.get("items").isJsonNull()) { - JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); - if (jsonArrayitems != null) { - // ensure the json data is an array - if (!jsonObj.get("items").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `items` to be an array in the JSON string but got `%s`", jsonObj.get("items").toString())); - } - - // validate the optional field `items` (array) - for (int i = 0; i < jsonArrayitems.size(); i++) { - V1alpha1ValidatingAdmissionPolicy.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject()); - }; - } + // ensure the json data is an array + if (!jsonObj.get("items").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `items` to be an array in the JSON string but got `%s`", jsonObj.get("items").toString())); } + + JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); + // validate the required field `items` (array) + for (int i = 0; i < jsonArrayitems.size(); i++) { + V1alpha1ValidatingAdmissionPolicy.validateJsonElement(jsonArrayitems.get(i)); + }; if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ListMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ListMeta.validateJsonElement(jsonObj.get("metadata")); } } @@ -292,9 +289,9 @@ public void write(JsonWriter out, V1alpha1ValidatingAdmissionPolicyList value) t @Override public V1alpha1ValidatingAdmissionPolicyList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -321,3 +318,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicySpec.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicySpec.java index e71033d823..c1f67f2539 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicySpec.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicySpec.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -27,6 +27,7 @@ import io.kubernetes.client.openapi.models.V1alpha1Variable; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -49,7 +50,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -57,11 +57,11 @@ /** * ValidatingAdmissionPolicySpec is the specification of the desired behavior of the AdmissionPolicy. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha1ValidatingAdmissionPolicySpec { public static final String SERIALIZED_NAME_AUDIT_ANNOTATIONS = "auditAnnotations"; @SerializedName(SERIALIZED_NAME_AUDIT_ANNOTATIONS) - private List auditAnnotations; + private List auditAnnotations = new ArrayList<>(); public static final String SERIALIZED_NAME_FAILURE_POLICY = "failurePolicy"; @SerializedName(SERIALIZED_NAME_FAILURE_POLICY) @@ -69,7 +69,7 @@ public class V1alpha1ValidatingAdmissionPolicySpec { public static final String SERIALIZED_NAME_MATCH_CONDITIONS = "matchConditions"; @SerializedName(SERIALIZED_NAME_MATCH_CONDITIONS) - private List matchConditions; + private List matchConditions = new ArrayList<>(); public static final String SERIALIZED_NAME_MATCH_CONSTRAINTS = "matchConstraints"; @SerializedName(SERIALIZED_NAME_MATCH_CONSTRAINTS) @@ -81,17 +81,16 @@ public class V1alpha1ValidatingAdmissionPolicySpec { public static final String SERIALIZED_NAME_VALIDATIONS = "validations"; @SerializedName(SERIALIZED_NAME_VALIDATIONS) - private List validations; + private List validations = new ArrayList<>(); public static final String SERIALIZED_NAME_VARIABLES = "variables"; @SerializedName(SERIALIZED_NAME_VARIABLES) - private List variables; + private List variables = new ArrayList<>(); public V1alpha1ValidatingAdmissionPolicySpec() { } public V1alpha1ValidatingAdmissionPolicySpec auditAnnotations(List auditAnnotations) { - this.auditAnnotations = auditAnnotations; return this; } @@ -113,14 +112,12 @@ public List getAuditAnnotations() { return auditAnnotations; } - public void setAuditAnnotations(List auditAnnotations) { this.auditAnnotations = auditAnnotations; } public V1alpha1ValidatingAdmissionPolicySpec failurePolicy(String failurePolicy) { - this.failurePolicy = failurePolicy; return this; } @@ -134,14 +131,12 @@ public String getFailurePolicy() { return failurePolicy; } - public void setFailurePolicy(String failurePolicy) { this.failurePolicy = failurePolicy; } public V1alpha1ValidatingAdmissionPolicySpec matchConditions(List matchConditions) { - this.matchConditions = matchConditions; return this; } @@ -163,14 +158,12 @@ public List getMatchConditions() { return matchConditions; } - public void setMatchConditions(List matchConditions) { this.matchConditions = matchConditions; } public V1alpha1ValidatingAdmissionPolicySpec matchConstraints(V1alpha1MatchResources matchConstraints) { - this.matchConstraints = matchConstraints; return this; } @@ -184,14 +177,12 @@ public V1alpha1MatchResources getMatchConstraints() { return matchConstraints; } - public void setMatchConstraints(V1alpha1MatchResources matchConstraints) { this.matchConstraints = matchConstraints; } public V1alpha1ValidatingAdmissionPolicySpec paramKind(V1alpha1ParamKind paramKind) { - this.paramKind = paramKind; return this; } @@ -205,14 +196,12 @@ public V1alpha1ParamKind getParamKind() { return paramKind; } - public void setParamKind(V1alpha1ParamKind paramKind) { this.paramKind = paramKind; } public V1alpha1ValidatingAdmissionPolicySpec validations(List validations) { - this.validations = validations; return this; } @@ -234,14 +223,12 @@ public List getValidations() { return validations; } - public void setValidations(List validations) { this.validations = validations; } public V1alpha1ValidatingAdmissionPolicySpec variables(List variables) { - this.variables = variables; return this; } @@ -263,7 +250,6 @@ public List getVariables() { return variables; } - public void setVariables(List variables) { this.variables = variables; } @@ -339,25 +325,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha1ValidatingAdmissionPolicySpec + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha1ValidatingAdmissionPolicySpec */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha1ValidatingAdmissionPolicySpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha1ValidatingAdmissionPolicySpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha1ValidatingAdmissionPolicySpec is not found in the empty JSON string", V1alpha1ValidatingAdmissionPolicySpec.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha1ValidatingAdmissionPolicySpec.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1ValidatingAdmissionPolicySpec` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1ValidatingAdmissionPolicySpec` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (jsonObj.get("auditAnnotations") != null && !jsonObj.get("auditAnnotations").isJsonNull()) { JsonArray jsonArrayauditAnnotations = jsonObj.getAsJsonArray("auditAnnotations"); if (jsonArrayauditAnnotations != null) { @@ -368,7 +355,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `auditAnnotations` (array) for (int i = 0; i < jsonArrayauditAnnotations.size(); i++) { - V1alpha1AuditAnnotation.validateJsonObject(jsonArrayauditAnnotations.get(i).getAsJsonObject()); + V1alpha1AuditAnnotation.validateJsonElement(jsonArrayauditAnnotations.get(i)); }; } } @@ -385,17 +372,17 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `matchConditions` (array) for (int i = 0; i < jsonArraymatchConditions.size(); i++) { - V1alpha1MatchCondition.validateJsonObject(jsonArraymatchConditions.get(i).getAsJsonObject()); + V1alpha1MatchCondition.validateJsonElement(jsonArraymatchConditions.get(i)); }; } } // validate the optional field `matchConstraints` if (jsonObj.get("matchConstraints") != null && !jsonObj.get("matchConstraints").isJsonNull()) { - V1alpha1MatchResources.validateJsonObject(jsonObj.getAsJsonObject("matchConstraints")); + V1alpha1MatchResources.validateJsonElement(jsonObj.get("matchConstraints")); } // validate the optional field `paramKind` if (jsonObj.get("paramKind") != null && !jsonObj.get("paramKind").isJsonNull()) { - V1alpha1ParamKind.validateJsonObject(jsonObj.getAsJsonObject("paramKind")); + V1alpha1ParamKind.validateJsonElement(jsonObj.get("paramKind")); } if (jsonObj.get("validations") != null && !jsonObj.get("validations").isJsonNull()) { JsonArray jsonArrayvalidations = jsonObj.getAsJsonArray("validations"); @@ -407,7 +394,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `validations` (array) for (int i = 0; i < jsonArrayvalidations.size(); i++) { - V1alpha1Validation.validateJsonObject(jsonArrayvalidations.get(i).getAsJsonObject()); + V1alpha1Validation.validateJsonElement(jsonArrayvalidations.get(i)); }; } } @@ -421,7 +408,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `variables` (array) for (int i = 0; i < jsonArrayvariables.size(); i++) { - V1alpha1Variable.validateJsonObject(jsonArrayvariables.get(i).getAsJsonObject()); + V1alpha1Variable.validateJsonElement(jsonArrayvariables.get(i)); }; } } @@ -447,9 +434,9 @@ public void write(JsonWriter out, V1alpha1ValidatingAdmissionPolicySpec value) t @Override public V1alpha1ValidatingAdmissionPolicySpec read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -476,3 +463,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyStatus.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyStatus.java index 2dad29bbd7..8e98f0e5bb 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyStatus.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyStatus.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1alpha1TypeChecking; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,11 +53,11 @@ /** * ValidatingAdmissionPolicyStatus represents the status of a ValidatingAdmissionPolicy. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha1ValidatingAdmissionPolicyStatus { public static final String SERIALIZED_NAME_CONDITIONS = "conditions"; @SerializedName(SERIALIZED_NAME_CONDITIONS) - private List conditions; + private List conditions = new ArrayList<>(); public static final String SERIALIZED_NAME_OBSERVED_GENERATION = "observedGeneration"; @SerializedName(SERIALIZED_NAME_OBSERVED_GENERATION) @@ -71,7 +71,6 @@ public V1alpha1ValidatingAdmissionPolicyStatus() { } public V1alpha1ValidatingAdmissionPolicyStatus conditions(List conditions) { - this.conditions = conditions; return this; } @@ -93,14 +92,12 @@ public List getConditions() { return conditions; } - public void setConditions(List conditions) { this.conditions = conditions; } public V1alpha1ValidatingAdmissionPolicyStatus observedGeneration(Long observedGeneration) { - this.observedGeneration = observedGeneration; return this; } @@ -114,14 +111,12 @@ public Long getObservedGeneration() { return observedGeneration; } - public void setObservedGeneration(Long observedGeneration) { this.observedGeneration = observedGeneration; } public V1alpha1ValidatingAdmissionPolicyStatus typeChecking(V1alpha1TypeChecking typeChecking) { - this.typeChecking = typeChecking; return this; } @@ -135,7 +130,6 @@ public V1alpha1TypeChecking getTypeChecking() { return typeChecking; } - public void setTypeChecking(V1alpha1TypeChecking typeChecking) { this.typeChecking = typeChecking; } @@ -199,25 +193,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha1ValidatingAdmissionPolicyStatus + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha1ValidatingAdmissionPolicyStatus */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha1ValidatingAdmissionPolicyStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha1ValidatingAdmissionPolicyStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha1ValidatingAdmissionPolicyStatus is not found in the empty JSON string", V1alpha1ValidatingAdmissionPolicyStatus.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha1ValidatingAdmissionPolicyStatus.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1ValidatingAdmissionPolicyStatus` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1ValidatingAdmissionPolicyStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (jsonObj.get("conditions") != null && !jsonObj.get("conditions").isJsonNull()) { JsonArray jsonArrayconditions = jsonObj.getAsJsonArray("conditions"); if (jsonArrayconditions != null) { @@ -228,13 +223,13 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `conditions` (array) for (int i = 0; i < jsonArrayconditions.size(); i++) { - V1Condition.validateJsonObject(jsonArrayconditions.get(i).getAsJsonObject()); + V1Condition.validateJsonElement(jsonArrayconditions.get(i)); }; } } // validate the optional field `typeChecking` if (jsonObj.get("typeChecking") != null && !jsonObj.get("typeChecking").isJsonNull()) { - V1alpha1TypeChecking.validateJsonObject(jsonObj.getAsJsonObject("typeChecking")); + V1alpha1TypeChecking.validateJsonElement(jsonObj.get("typeChecking")); } } @@ -258,9 +253,9 @@ public void write(JsonWriter out, V1alpha1ValidatingAdmissionPolicyStatus value) @Override public V1alpha1ValidatingAdmissionPolicyStatus read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -287,3 +282,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1Validation.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1Validation.java index af7e013a44..378239d763 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1Validation.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1Validation.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * Validation specifies the CEL expression which is used to apply the validation. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha1Validation { public static final String SERIALIZED_NAME_EXPRESSION = "expression"; @SerializedName(SERIALIZED_NAME_EXPRESSION) @@ -71,7 +71,6 @@ public V1alpha1Validation() { } public V1alpha1Validation expression(String expression) { - this.expression = expression; return this; } @@ -85,14 +84,12 @@ public String getExpression() { return expression; } - public void setExpression(String expression) { this.expression = expression; } public V1alpha1Validation message(String message) { - this.message = message; return this; } @@ -106,14 +103,12 @@ public String getMessage() { return message; } - public void setMessage(String message) { this.message = message; } public V1alpha1Validation messageExpression(String messageExpression) { - this.messageExpression = messageExpression; return this; } @@ -127,14 +122,12 @@ public String getMessageExpression() { return messageExpression; } - public void setMessageExpression(String messageExpression) { this.messageExpression = messageExpression; } public V1alpha1Validation reason(String reason) { - this.reason = reason; return this; } @@ -148,7 +141,6 @@ public String getReason() { return reason; } - public void setReason(String reason) { this.reason = reason; } @@ -216,32 +208,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha1Validation + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha1Validation */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha1Validation.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha1Validation.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha1Validation is not found in the empty JSON string", V1alpha1Validation.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha1Validation.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1Validation` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1Validation` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1alpha1Validation.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("expression").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `expression` to be a primitive type in the JSON string but got `%s`", jsonObj.get("expression").toString())); } @@ -276,9 +269,9 @@ public void write(JsonWriter out, V1alpha1Validation value) throws IOException { @Override public V1alpha1Validation read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -305,3 +298,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1Variable.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1Variable.java index c7f6c7f317..0ea2a72944 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1Variable.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1Variable.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * Variable is the definition of a variable that is used for composition. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha1Variable { public static final String SERIALIZED_NAME_EXPRESSION = "expression"; @SerializedName(SERIALIZED_NAME_EXPRESSION) @@ -63,7 +63,6 @@ public V1alpha1Variable() { } public V1alpha1Variable expression(String expression) { - this.expression = expression; return this; } @@ -77,14 +76,12 @@ public String getExpression() { return expression; } - public void setExpression(String expression) { this.expression = expression; } public V1alpha1Variable name(String name) { - this.name = name; return this; } @@ -98,7 +95,6 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } @@ -161,32 +157,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha1Variable + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha1Variable */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha1Variable.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha1Variable.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha1Variable is not found in the empty JSON string", V1alpha1Variable.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha1Variable.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1Variable` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1Variable` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1alpha1Variable.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("expression").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `expression` to be a primitive type in the JSON string but got `%s`", jsonObj.get("expression").toString())); } @@ -215,9 +212,9 @@ public void write(JsonWriter out, V1alpha1Variable value) throws IOException { @Override public V1alpha1Variable read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -244,3 +241,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1VolumeAttributesClass.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1VolumeAttributesClass.java index 42cbca4208..a25eaf56fa 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1VolumeAttributesClass.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1VolumeAttributesClass.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.openapi.models.V1ObjectMeta; import java.io.IOException; +import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * VolumeAttributesClass represents a specification of mutable volume attributes defined by the CSI driver. The class can be specified during dynamic provisioning of PersistentVolumeClaims, and changed in the PersistentVolumeClaim spec after provisioning. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha1VolumeAttributesClass implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -78,7 +78,6 @@ public V1alpha1VolumeAttributesClass() { } public V1alpha1VolumeAttributesClass apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -92,14 +91,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1alpha1VolumeAttributesClass driverName(String driverName) { - this.driverName = driverName; return this; } @@ -113,14 +110,12 @@ public String getDriverName() { return driverName; } - public void setDriverName(String driverName) { this.driverName = driverName; } public V1alpha1VolumeAttributesClass kind(String kind) { - this.kind = kind; return this; } @@ -134,14 +129,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1alpha1VolumeAttributesClass metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -155,14 +148,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V1alpha1VolumeAttributesClass parameters(Map parameters) { - this.parameters = parameters; return this; } @@ -184,7 +175,6 @@ public Map getParameters() { return parameters; } - public void setParameters(Map parameters) { this.parameters = parameters; } @@ -255,32 +245,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha1VolumeAttributesClass + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha1VolumeAttributesClass */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha1VolumeAttributesClass.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha1VolumeAttributesClass.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha1VolumeAttributesClass is not found in the empty JSON string", V1alpha1VolumeAttributesClass.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha1VolumeAttributesClass.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1VolumeAttributesClass` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1VolumeAttributesClass` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1alpha1VolumeAttributesClass.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -292,7 +283,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } } @@ -316,9 +307,9 @@ public void write(JsonWriter out, V1alpha1VolumeAttributesClass value) throws IO @Override public V1alpha1VolumeAttributesClass read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -345,3 +336,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1VolumeAttributesClassList.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1VolumeAttributesClassList.java index 994686d614..e71361312e 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1VolumeAttributesClassList.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1VolumeAttributesClassList.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1alpha1VolumeAttributesClass; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * VolumeAttributesClassList is a collection of VolumeAttributesClass objects. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha1VolumeAttributesClassList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -75,7 +75,6 @@ public V1alpha1VolumeAttributesClassList() { } public V1alpha1VolumeAttributesClassList apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -89,14 +88,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1alpha1VolumeAttributesClassList items(List items) { - this.items = items; return this; } @@ -118,14 +115,12 @@ public List getItems() { return items; } - public void setItems(List items) { this.items = items; } public V1alpha1VolumeAttributesClassList kind(String kind) { - this.kind = kind; return this; } @@ -139,14 +134,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1alpha1VolumeAttributesClassList metadata(V1ListMeta metadata) { - this.metadata = metadata; return this; } @@ -160,7 +153,6 @@ public V1ListMeta getMetadata() { return metadata; } - public void setMetadata(V1ListMeta metadata) { this.metadata = metadata; } @@ -228,32 +220,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha1VolumeAttributesClassList + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha1VolumeAttributesClassList */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha1VolumeAttributesClassList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha1VolumeAttributesClassList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha1VolumeAttributesClassList is not found in the empty JSON string", V1alpha1VolumeAttributesClassList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha1VolumeAttributesClassList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1VolumeAttributesClassList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha1VolumeAttributesClassList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1alpha1VolumeAttributesClassList.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -265,14 +258,14 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); // validate the required field `items` (array) for (int i = 0; i < jsonArrayitems.size(); i++) { - V1alpha1VolumeAttributesClass.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject()); + V1alpha1VolumeAttributesClass.validateJsonElement(jsonArrayitems.get(i)); }; if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ListMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ListMeta.validateJsonElement(jsonObj.get("metadata")); } } @@ -296,9 +289,9 @@ public void write(JsonWriter out, V1alpha1VolumeAttributesClassList value) throw @Override public V1alpha1VolumeAttributesClassList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -325,3 +318,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2AllocationResult.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2AllocationResult.java index 6d09be397f..b81be064d9 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2AllocationResult.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2AllocationResult.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1alpha2ResourceHandle; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * AllocationResult contains attributes of an allocated resource. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha2AllocationResult { public static final String SERIALIZED_NAME_AVAILABLE_ON_NODES = "availableOnNodes"; @SerializedName(SERIALIZED_NAME_AVAILABLE_ON_NODES) @@ -61,7 +61,7 @@ public class V1alpha2AllocationResult { public static final String SERIALIZED_NAME_RESOURCE_HANDLES = "resourceHandles"; @SerializedName(SERIALIZED_NAME_RESOURCE_HANDLES) - private List resourceHandles; + private List resourceHandles = new ArrayList<>(); public static final String SERIALIZED_NAME_SHAREABLE = "shareable"; @SerializedName(SERIALIZED_NAME_SHAREABLE) @@ -71,7 +71,6 @@ public V1alpha2AllocationResult() { } public V1alpha2AllocationResult availableOnNodes(V1NodeSelector availableOnNodes) { - this.availableOnNodes = availableOnNodes; return this; } @@ -85,14 +84,12 @@ public V1NodeSelector getAvailableOnNodes() { return availableOnNodes; } - public void setAvailableOnNodes(V1NodeSelector availableOnNodes) { this.availableOnNodes = availableOnNodes; } public V1alpha2AllocationResult resourceHandles(List resourceHandles) { - this.resourceHandles = resourceHandles; return this; } @@ -114,14 +111,12 @@ public List getResourceHandles() { return resourceHandles; } - public void setResourceHandles(List resourceHandles) { this.resourceHandles = resourceHandles; } public V1alpha2AllocationResult shareable(Boolean shareable) { - this.shareable = shareable; return this; } @@ -135,7 +130,6 @@ public Boolean getShareable() { return shareable; } - public void setShareable(Boolean shareable) { this.shareable = shareable; } @@ -199,28 +193,29 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha2AllocationResult + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha2AllocationResult */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha2AllocationResult.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha2AllocationResult.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha2AllocationResult is not found in the empty JSON string", V1alpha2AllocationResult.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha2AllocationResult.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha2AllocationResult` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha2AllocationResult` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `availableOnNodes` if (jsonObj.get("availableOnNodes") != null && !jsonObj.get("availableOnNodes").isJsonNull()) { - V1NodeSelector.validateJsonObject(jsonObj.getAsJsonObject("availableOnNodes")); + V1NodeSelector.validateJsonElement(jsonObj.get("availableOnNodes")); } if (jsonObj.get("resourceHandles") != null && !jsonObj.get("resourceHandles").isJsonNull()) { JsonArray jsonArrayresourceHandles = jsonObj.getAsJsonArray("resourceHandles"); @@ -232,7 +227,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `resourceHandles` (array) for (int i = 0; i < jsonArrayresourceHandles.size(); i++) { - V1alpha2ResourceHandle.validateJsonObject(jsonArrayresourceHandles.get(i).getAsJsonObject()); + V1alpha2ResourceHandle.validateJsonElement(jsonArrayresourceHandles.get(i)); }; } } @@ -258,9 +253,9 @@ public void write(JsonWriter out, V1alpha2AllocationResult value) throws IOExcep @Override public V1alpha2AllocationResult read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -287,3 +282,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2DriverAllocationResult.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2DriverAllocationResult.java index d8dc8f93a8..0e31a9b386 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2DriverAllocationResult.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2DriverAllocationResult.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.openapi.models.V1alpha2NamedResourcesAllocationResult; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * DriverAllocationResult contains vendor parameters and the allocation result for one request. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha2DriverAllocationResult { public static final String SERIALIZED_NAME_NAMED_RESOURCES = "namedResources"; @SerializedName(SERIALIZED_NAME_NAMED_RESOURCES) @@ -64,7 +64,6 @@ public V1alpha2DriverAllocationResult() { } public V1alpha2DriverAllocationResult namedResources(V1alpha2NamedResourcesAllocationResult namedResources) { - this.namedResources = namedResources; return this; } @@ -78,14 +77,12 @@ public V1alpha2NamedResourcesAllocationResult getNamedResources() { return namedResources; } - public void setNamedResources(V1alpha2NamedResourcesAllocationResult namedResources) { this.namedResources = namedResources; } public V1alpha2DriverAllocationResult vendorRequestParameters(Object vendorRequestParameters) { - this.vendorRequestParameters = vendorRequestParameters; return this; } @@ -99,7 +96,6 @@ public Object getVendorRequestParameters() { return vendorRequestParameters; } - public void setVendorRequestParameters(Object vendorRequestParameters) { this.vendorRequestParameters = vendorRequestParameters; } @@ -160,28 +156,29 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha2DriverAllocationResult + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha2DriverAllocationResult */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha2DriverAllocationResult.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha2DriverAllocationResult.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha2DriverAllocationResult is not found in the empty JSON string", V1alpha2DriverAllocationResult.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha2DriverAllocationResult.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha2DriverAllocationResult` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha2DriverAllocationResult` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `namedResources` if (jsonObj.get("namedResources") != null && !jsonObj.get("namedResources").isJsonNull()) { - V1alpha2NamedResourcesAllocationResult.validateJsonObject(jsonObj.getAsJsonObject("namedResources")); + V1alpha2NamedResourcesAllocationResult.validateJsonElement(jsonObj.get("namedResources")); } } @@ -205,9 +202,9 @@ public void write(JsonWriter out, V1alpha2DriverAllocationResult value) throws I @Override public V1alpha2DriverAllocationResult read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -234,3 +231,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2DriverRequests.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2DriverRequests.java index 527ab6143d..a81fc95d02 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2DriverRequests.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2DriverRequests.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1alpha2ResourceRequest; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * DriverRequests describes all resources that are needed from one particular driver. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha2DriverRequests { public static final String SERIALIZED_NAME_DRIVER_NAME = "driverName"; @SerializedName(SERIALIZED_NAME_DRIVER_NAME) @@ -60,7 +60,7 @@ public class V1alpha2DriverRequests { public static final String SERIALIZED_NAME_REQUESTS = "requests"; @SerializedName(SERIALIZED_NAME_REQUESTS) - private List requests; + private List requests = new ArrayList<>(); public static final String SERIALIZED_NAME_VENDOR_PARAMETERS = "vendorParameters"; @SerializedName(SERIALIZED_NAME_VENDOR_PARAMETERS) @@ -70,7 +70,6 @@ public V1alpha2DriverRequests() { } public V1alpha2DriverRequests driverName(String driverName) { - this.driverName = driverName; return this; } @@ -84,14 +83,12 @@ public String getDriverName() { return driverName; } - public void setDriverName(String driverName) { this.driverName = driverName; } public V1alpha2DriverRequests requests(List requests) { - this.requests = requests; return this; } @@ -113,14 +110,12 @@ public List getRequests() { return requests; } - public void setRequests(List requests) { this.requests = requests; } public V1alpha2DriverRequests vendorParameters(Object vendorParameters) { - this.vendorParameters = vendorParameters; return this; } @@ -134,7 +129,6 @@ public Object getVendorParameters() { return vendorParameters; } - public void setVendorParameters(Object vendorParameters) { this.vendorParameters = vendorParameters; } @@ -198,25 +192,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha2DriverRequests + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha2DriverRequests */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha2DriverRequests.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha2DriverRequests.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha2DriverRequests is not found in the empty JSON string", V1alpha2DriverRequests.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha2DriverRequests.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha2DriverRequests` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha2DriverRequests` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("driverName") != null && !jsonObj.get("driverName").isJsonNull()) && !jsonObj.get("driverName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `driverName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("driverName").toString())); } @@ -230,7 +225,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `requests` (array) for (int i = 0; i < jsonArrayrequests.size(); i++) { - V1alpha2ResourceRequest.validateJsonObject(jsonArrayrequests.get(i).getAsJsonObject()); + V1alpha2ResourceRequest.validateJsonElement(jsonArrayrequests.get(i)); }; } } @@ -256,9 +251,9 @@ public void write(JsonWriter out, V1alpha2DriverRequests value) throws IOExcepti @Override public V1alpha2DriverRequests read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -285,3 +280,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2NamedResourcesAllocationResult.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2NamedResourcesAllocationResult.java index 5e03b449ed..69b3449492 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2NamedResourcesAllocationResult.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2NamedResourcesAllocationResult.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * NamedResourcesAllocationResult is used in AllocationResultModel. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha2NamedResourcesAllocationResult { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) @@ -59,7 +59,6 @@ public V1alpha2NamedResourcesAllocationResult() { } public V1alpha2NamedResourcesAllocationResult name(String name) { - this.name = name; return this; } @@ -73,7 +72,6 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } @@ -132,32 +130,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha2NamedResourcesAllocationResult + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha2NamedResourcesAllocationResult */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha2NamedResourcesAllocationResult.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha2NamedResourcesAllocationResult.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha2NamedResourcesAllocationResult is not found in the empty JSON string", V1alpha2NamedResourcesAllocationResult.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha2NamedResourcesAllocationResult.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha2NamedResourcesAllocationResult` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha2NamedResourcesAllocationResult` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1alpha2NamedResourcesAllocationResult.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } @@ -183,9 +182,9 @@ public void write(JsonWriter out, V1alpha2NamedResourcesAllocationResult value) @Override public V1alpha2NamedResourcesAllocationResult read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -212,3 +211,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2NamedResourcesAttribute.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2NamedResourcesAttribute.java index 28f0844ef0..69224c58ab 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2NamedResourcesAttribute.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2NamedResourcesAttribute.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1alpha2NamedResourcesIntSlice; import io.kubernetes.client.openapi.models.V1alpha2NamedResourcesStringSlice; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * NamedResourcesAttribute is a combination of an attribute name and its value. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha2NamedResourcesAttribute { public static final String SERIALIZED_NAME_BOOL = "bool"; @SerializedName(SERIALIZED_NAME_BOOL) @@ -90,7 +90,6 @@ public V1alpha2NamedResourcesAttribute() { } public V1alpha2NamedResourcesAttribute bool(Boolean bool) { - this.bool = bool; return this; } @@ -104,14 +103,12 @@ public Boolean getBool() { return bool; } - public void setBool(Boolean bool) { this.bool = bool; } public V1alpha2NamedResourcesAttribute _int(Long _int) { - this._int = _int; return this; } @@ -125,14 +122,12 @@ public Long getInt() { return _int; } - public void setInt(Long _int) { this._int = _int; } public V1alpha2NamedResourcesAttribute intSlice(V1alpha2NamedResourcesIntSlice intSlice) { - this.intSlice = intSlice; return this; } @@ -146,14 +141,12 @@ public V1alpha2NamedResourcesIntSlice getIntSlice() { return intSlice; } - public void setIntSlice(V1alpha2NamedResourcesIntSlice intSlice) { this.intSlice = intSlice; } public V1alpha2NamedResourcesAttribute name(String name) { - this.name = name; return this; } @@ -167,14 +160,12 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } public V1alpha2NamedResourcesAttribute quantity(Quantity quantity) { - this.quantity = quantity; return this; } @@ -188,14 +179,12 @@ public Quantity getQuantity() { return quantity; } - public void setQuantity(Quantity quantity) { this.quantity = quantity; } public V1alpha2NamedResourcesAttribute string(String string) { - this.string = string; return this; } @@ -209,14 +198,12 @@ public String getString() { return string; } - public void setString(String string) { this.string = string; } public V1alpha2NamedResourcesAttribute stringSlice(V1alpha2NamedResourcesStringSlice stringSlice) { - this.stringSlice = stringSlice; return this; } @@ -230,14 +217,12 @@ public V1alpha2NamedResourcesStringSlice getStringSlice() { return stringSlice; } - public void setStringSlice(V1alpha2NamedResourcesStringSlice stringSlice) { this.stringSlice = stringSlice; } public V1alpha2NamedResourcesAttribute version(String version) { - this.version = version; return this; } @@ -251,7 +236,6 @@ public String getVersion() { return version; } - public void setVersion(String version) { this.version = version; } @@ -331,35 +315,36 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha2NamedResourcesAttribute + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha2NamedResourcesAttribute */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha2NamedResourcesAttribute.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha2NamedResourcesAttribute.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha2NamedResourcesAttribute is not found in the empty JSON string", V1alpha2NamedResourcesAttribute.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha2NamedResourcesAttribute.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha2NamedResourcesAttribute` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha2NamedResourcesAttribute` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1alpha2NamedResourcesAttribute.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `intSlice` if (jsonObj.get("intSlice") != null && !jsonObj.get("intSlice").isJsonNull()) { - V1alpha2NamedResourcesIntSlice.validateJsonObject(jsonObj.getAsJsonObject("intSlice")); + V1alpha2NamedResourcesIntSlice.validateJsonElement(jsonObj.get("intSlice")); } if (!jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); @@ -372,7 +357,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `stringSlice` if (jsonObj.get("stringSlice") != null && !jsonObj.get("stringSlice").isJsonNull()) { - V1alpha2NamedResourcesStringSlice.validateJsonObject(jsonObj.getAsJsonObject("stringSlice")); + V1alpha2NamedResourcesStringSlice.validateJsonElement(jsonObj.get("stringSlice")); } if ((jsonObj.get("version") != null && !jsonObj.get("version").isJsonNull()) && !jsonObj.get("version").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `version` to be a primitive type in the JSON string but got `%s`", jsonObj.get("version").toString())); @@ -399,9 +384,9 @@ public void write(JsonWriter out, V1alpha2NamedResourcesAttribute value) throws @Override public V1alpha2NamedResourcesAttribute read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -428,3 +413,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2NamedResourcesFilter.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2NamedResourcesFilter.java index 3ea811d959..1f689d1b80 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2NamedResourcesFilter.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2NamedResourcesFilter.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * NamedResourcesFilter is used in ResourceFilterModel. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha2NamedResourcesFilter { public static final String SERIALIZED_NAME_SELECTOR = "selector"; @SerializedName(SERIALIZED_NAME_SELECTOR) @@ -59,7 +59,6 @@ public V1alpha2NamedResourcesFilter() { } public V1alpha2NamedResourcesFilter selector(String selector) { - this.selector = selector; return this; } @@ -73,7 +72,6 @@ public String getSelector() { return selector; } - public void setSelector(String selector) { this.selector = selector; } @@ -132,32 +130,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha2NamedResourcesFilter + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha2NamedResourcesFilter */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha2NamedResourcesFilter.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha2NamedResourcesFilter.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha2NamedResourcesFilter is not found in the empty JSON string", V1alpha2NamedResourcesFilter.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha2NamedResourcesFilter.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha2NamedResourcesFilter` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha2NamedResourcesFilter` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1alpha2NamedResourcesFilter.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("selector").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `selector` to be a primitive type in the JSON string but got `%s`", jsonObj.get("selector").toString())); } @@ -183,9 +182,9 @@ public void write(JsonWriter out, V1alpha2NamedResourcesFilter value) throws IOE @Override public V1alpha2NamedResourcesFilter read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -212,3 +211,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2NamedResourcesInstance.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2NamedResourcesInstance.java index 02cc14779e..fb911eea76 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2NamedResourcesInstance.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2NamedResourcesInstance.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1alpha2NamedResourcesAttribute; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,11 +52,11 @@ /** * NamedResourcesInstance represents one individual hardware instance that can be selected based on its attributes. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha2NamedResourcesInstance { public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private List attributes; + private List attributes = new ArrayList<>(); public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) @@ -66,7 +66,6 @@ public V1alpha2NamedResourcesInstance() { } public V1alpha2NamedResourcesInstance attributes(List attributes) { - this.attributes = attributes; return this; } @@ -88,14 +87,12 @@ public List getAttributes() { return attributes; } - public void setAttributes(List attributes) { this.attributes = attributes; } public V1alpha2NamedResourcesInstance name(String name) { - this.name = name; return this; } @@ -109,7 +106,6 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } @@ -171,32 +167,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha2NamedResourcesInstance + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha2NamedResourcesInstance */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha2NamedResourcesInstance.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha2NamedResourcesInstance.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha2NamedResourcesInstance is not found in the empty JSON string", V1alpha2NamedResourcesInstance.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha2NamedResourcesInstance.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha2NamedResourcesInstance` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha2NamedResourcesInstance` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1alpha2NamedResourcesInstance.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { JsonArray jsonArrayattributes = jsonObj.getAsJsonArray("attributes"); if (jsonArrayattributes != null) { @@ -207,7 +204,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `attributes` (array) for (int i = 0; i < jsonArrayattributes.size(); i++) { - V1alpha2NamedResourcesAttribute.validateJsonObject(jsonArrayattributes.get(i).getAsJsonObject()); + V1alpha2NamedResourcesAttribute.validateJsonElement(jsonArrayattributes.get(i)); }; } } @@ -236,9 +233,9 @@ public void write(JsonWriter out, V1alpha2NamedResourcesInstance value) throws I @Override public V1alpha2NamedResourcesInstance read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -265,3 +262,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2NamedResourcesIntSlice.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2NamedResourcesIntSlice.java index ab56e5e234..d1d99fbedf 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2NamedResourcesIntSlice.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2NamedResourcesIntSlice.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -43,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -51,7 +51,7 @@ /** * NamedResourcesIntSlice contains a slice of 64-bit integers. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha2NamedResourcesIntSlice { public static final String SERIALIZED_NAME_INTS = "ints"; @SerializedName(SERIALIZED_NAME_INTS) @@ -61,7 +61,6 @@ public V1alpha2NamedResourcesIntSlice() { } public V1alpha2NamedResourcesIntSlice ints(List ints) { - this.ints = ints; return this; } @@ -83,7 +82,6 @@ public List getInts() { return ints; } - public void setInts(List ints) { this.ints = ints; } @@ -142,32 +140,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha2NamedResourcesIntSlice + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha2NamedResourcesIntSlice */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha2NamedResourcesIntSlice.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha2NamedResourcesIntSlice.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha2NamedResourcesIntSlice is not found in the empty JSON string", V1alpha2NamedResourcesIntSlice.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha2NamedResourcesIntSlice.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha2NamedResourcesIntSlice` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha2NamedResourcesIntSlice` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1alpha2NamedResourcesIntSlice.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the required json array is present if (jsonObj.get("ints") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); @@ -196,9 +195,9 @@ public void write(JsonWriter out, V1alpha2NamedResourcesIntSlice value) throws I @Override public V1alpha2NamedResourcesIntSlice read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -225,3 +224,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2NamedResourcesRequest.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2NamedResourcesRequest.java index 28519aca19..24440ea6c9 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2NamedResourcesRequest.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2NamedResourcesRequest.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * NamedResourcesRequest is used in ResourceRequestModel. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha2NamedResourcesRequest { public static final String SERIALIZED_NAME_SELECTOR = "selector"; @SerializedName(SERIALIZED_NAME_SELECTOR) @@ -59,7 +59,6 @@ public V1alpha2NamedResourcesRequest() { } public V1alpha2NamedResourcesRequest selector(String selector) { - this.selector = selector; return this; } @@ -73,7 +72,6 @@ public String getSelector() { return selector; } - public void setSelector(String selector) { this.selector = selector; } @@ -132,32 +130,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha2NamedResourcesRequest + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha2NamedResourcesRequest */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha2NamedResourcesRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha2NamedResourcesRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha2NamedResourcesRequest is not found in the empty JSON string", V1alpha2NamedResourcesRequest.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha2NamedResourcesRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha2NamedResourcesRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha2NamedResourcesRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1alpha2NamedResourcesRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("selector").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `selector` to be a primitive type in the JSON string but got `%s`", jsonObj.get("selector").toString())); } @@ -183,9 +182,9 @@ public void write(JsonWriter out, V1alpha2NamedResourcesRequest value) throws IO @Override public V1alpha2NamedResourcesRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -212,3 +211,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2NamedResourcesResources.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2NamedResourcesResources.java index ce14a6969b..7002e80d9d 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2NamedResourcesResources.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2NamedResourcesResources.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1alpha2NamedResourcesInstance; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * NamedResourcesResources is used in ResourceModel. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha2NamedResourcesResources { public static final String SERIALIZED_NAME_INSTANCES = "instances"; @SerializedName(SERIALIZED_NAME_INSTANCES) @@ -62,7 +62,6 @@ public V1alpha2NamedResourcesResources() { } public V1alpha2NamedResourcesResources instances(List instances) { - this.instances = instances; return this; } @@ -84,7 +83,6 @@ public List getInstances() { return instances; } - public void setInstances(List instances) { this.instances = instances; } @@ -143,32 +141,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha2NamedResourcesResources + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha2NamedResourcesResources */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha2NamedResourcesResources.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha2NamedResourcesResources.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha2NamedResourcesResources is not found in the empty JSON string", V1alpha2NamedResourcesResources.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha2NamedResourcesResources.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha2NamedResourcesResources` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha2NamedResourcesResources` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1alpha2NamedResourcesResources.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the json data is an array if (!jsonObj.get("instances").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `instances` to be an array in the JSON string but got `%s`", jsonObj.get("instances").toString())); @@ -177,7 +176,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArrayinstances = jsonObj.getAsJsonArray("instances"); // validate the required field `instances` (array) for (int i = 0; i < jsonArrayinstances.size(); i++) { - V1alpha2NamedResourcesInstance.validateJsonObject(jsonArrayinstances.get(i).getAsJsonObject()); + V1alpha2NamedResourcesInstance.validateJsonElement(jsonArrayinstances.get(i)); }; } @@ -201,9 +200,9 @@ public void write(JsonWriter out, V1alpha2NamedResourcesResources value) throws @Override public V1alpha2NamedResourcesResources read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -230,3 +229,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2NamedResourcesStringSlice.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2NamedResourcesStringSlice.java index 037e2b23bf..28ebacae89 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2NamedResourcesStringSlice.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2NamedResourcesStringSlice.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -43,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -51,7 +51,7 @@ /** * NamedResourcesStringSlice contains a slice of strings. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha2NamedResourcesStringSlice { public static final String SERIALIZED_NAME_STRINGS = "strings"; @SerializedName(SERIALIZED_NAME_STRINGS) @@ -61,7 +61,6 @@ public V1alpha2NamedResourcesStringSlice() { } public V1alpha2NamedResourcesStringSlice strings(List strings) { - this.strings = strings; return this; } @@ -83,7 +82,6 @@ public List getStrings() { return strings; } - public void setStrings(List strings) { this.strings = strings; } @@ -142,32 +140,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha2NamedResourcesStringSlice + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha2NamedResourcesStringSlice */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha2NamedResourcesStringSlice.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha2NamedResourcesStringSlice.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha2NamedResourcesStringSlice is not found in the empty JSON string", V1alpha2NamedResourcesStringSlice.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha2NamedResourcesStringSlice.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha2NamedResourcesStringSlice` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha2NamedResourcesStringSlice` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1alpha2NamedResourcesStringSlice.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the required json array is present if (jsonObj.get("strings") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); @@ -196,9 +195,9 @@ public void write(JsonWriter out, V1alpha2NamedResourcesStringSlice value) throw @Override public V1alpha2NamedResourcesStringSlice read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -225,3 +224,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2PodSchedulingContext.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2PodSchedulingContext.java index cd8409aee2..4f5acd5241 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2PodSchedulingContext.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2PodSchedulingContext.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1alpha2PodSchedulingContextSpec; import io.kubernetes.client.openapi.models.V1alpha2PodSchedulingContextStatus; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * PodSchedulingContext objects hold information that is needed to schedule a Pod with ResourceClaims that use \"WaitForFirstConsumer\" allocation mode. This is an alpha type and requires enabling the DynamicResourceAllocation feature gate. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha2PodSchedulingContext implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -78,7 +78,6 @@ public V1alpha2PodSchedulingContext() { } public V1alpha2PodSchedulingContext apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -92,14 +91,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1alpha2PodSchedulingContext kind(String kind) { - this.kind = kind; return this; } @@ -113,14 +110,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1alpha2PodSchedulingContext metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -134,14 +129,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V1alpha2PodSchedulingContext spec(V1alpha2PodSchedulingContextSpec spec) { - this.spec = spec; return this; } @@ -155,14 +148,12 @@ public V1alpha2PodSchedulingContextSpec getSpec() { return spec; } - public void setSpec(V1alpha2PodSchedulingContextSpec spec) { this.spec = spec; } public V1alpha2PodSchedulingContext status(V1alpha2PodSchedulingContextStatus status) { - this.status = status; return this; } @@ -176,7 +167,6 @@ public V1alpha2PodSchedulingContextStatus getStatus() { return status; } - public void setStatus(V1alpha2PodSchedulingContextStatus status) { this.status = status; } @@ -247,32 +237,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha2PodSchedulingContext + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha2PodSchedulingContext */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha2PodSchedulingContext.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha2PodSchedulingContext.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha2PodSchedulingContext is not found in the empty JSON string", V1alpha2PodSchedulingContext.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha2PodSchedulingContext.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha2PodSchedulingContext` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha2PodSchedulingContext` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1alpha2PodSchedulingContext.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -281,13 +272,13 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } // validate the required field `spec` - V1alpha2PodSchedulingContextSpec.validateJsonObject(jsonObj.getAsJsonObject("spec")); + V1alpha2PodSchedulingContextSpec.validateJsonElement(jsonObj.get("spec")); // validate the optional field `status` if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { - V1alpha2PodSchedulingContextStatus.validateJsonObject(jsonObj.getAsJsonObject("status")); + V1alpha2PodSchedulingContextStatus.validateJsonElement(jsonObj.get("status")); } } @@ -311,9 +302,9 @@ public void write(JsonWriter out, V1alpha2PodSchedulingContext value) throws IOE @Override public V1alpha2PodSchedulingContext read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -340,3 +331,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2PodSchedulingContextList.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2PodSchedulingContextList.java index fded07cb5e..7e2f172f71 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2PodSchedulingContextList.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2PodSchedulingContextList.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1alpha2PodSchedulingContext; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * PodSchedulingContextList is a collection of Pod scheduling objects. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha2PodSchedulingContextList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -75,7 +75,6 @@ public V1alpha2PodSchedulingContextList() { } public V1alpha2PodSchedulingContextList apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -89,14 +88,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1alpha2PodSchedulingContextList items(List items) { - this.items = items; return this; } @@ -118,14 +115,12 @@ public List getItems() { return items; } - public void setItems(List items) { this.items = items; } public V1alpha2PodSchedulingContextList kind(String kind) { - this.kind = kind; return this; } @@ -139,14 +134,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1alpha2PodSchedulingContextList metadata(V1ListMeta metadata) { - this.metadata = metadata; return this; } @@ -160,7 +153,6 @@ public V1ListMeta getMetadata() { return metadata; } - public void setMetadata(V1ListMeta metadata) { this.metadata = metadata; } @@ -228,32 +220,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha2PodSchedulingContextList + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha2PodSchedulingContextList */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha2PodSchedulingContextList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha2PodSchedulingContextList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha2PodSchedulingContextList is not found in the empty JSON string", V1alpha2PodSchedulingContextList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha2PodSchedulingContextList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha2PodSchedulingContextList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha2PodSchedulingContextList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1alpha2PodSchedulingContextList.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -265,14 +258,14 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); // validate the required field `items` (array) for (int i = 0; i < jsonArrayitems.size(); i++) { - V1alpha2PodSchedulingContext.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject()); + V1alpha2PodSchedulingContext.validateJsonElement(jsonArrayitems.get(i)); }; if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ListMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ListMeta.validateJsonElement(jsonObj.get("metadata")); } } @@ -296,9 +289,9 @@ public void write(JsonWriter out, V1alpha2PodSchedulingContextList value) throws @Override public V1alpha2PodSchedulingContextList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -325,3 +318,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2PodSchedulingContextSpec.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2PodSchedulingContextSpec.java index a8f312104d..662feac280 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2PodSchedulingContextSpec.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2PodSchedulingContextSpec.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -43,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -51,11 +51,11 @@ /** * PodSchedulingContextSpec describes where resources for the Pod are needed. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha2PodSchedulingContextSpec { public static final String SERIALIZED_NAME_POTENTIAL_NODES = "potentialNodes"; @SerializedName(SERIALIZED_NAME_POTENTIAL_NODES) - private List potentialNodes; + private List potentialNodes = new ArrayList<>(); public static final String SERIALIZED_NAME_SELECTED_NODE = "selectedNode"; @SerializedName(SERIALIZED_NAME_SELECTED_NODE) @@ -65,7 +65,6 @@ public V1alpha2PodSchedulingContextSpec() { } public V1alpha2PodSchedulingContextSpec potentialNodes(List potentialNodes) { - this.potentialNodes = potentialNodes; return this; } @@ -87,14 +86,12 @@ public List getPotentialNodes() { return potentialNodes; } - public void setPotentialNodes(List potentialNodes) { this.potentialNodes = potentialNodes; } public V1alpha2PodSchedulingContextSpec selectedNode(String selectedNode) { - this.selectedNode = selectedNode; return this; } @@ -108,7 +105,6 @@ public String getSelectedNode() { return selectedNode; } - public void setSelectedNode(String selectedNode) { this.selectedNode = selectedNode; } @@ -169,27 +165,28 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha2PodSchedulingContextSpec + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha2PodSchedulingContextSpec */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha2PodSchedulingContextSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha2PodSchedulingContextSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha2PodSchedulingContextSpec is not found in the empty JSON string", V1alpha2PodSchedulingContextSpec.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha2PodSchedulingContextSpec.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha2PodSchedulingContextSpec` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha2PodSchedulingContextSpec` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the optional json data is an array if present - if (jsonObj.get("potentialNodes") != null && !jsonObj.get("potentialNodes").isJsonArray()) { + if (jsonObj.get("potentialNodes") != null && !jsonObj.get("potentialNodes").isJsonNull() && !jsonObj.get("potentialNodes").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `potentialNodes` to be an array in the JSON string but got `%s`", jsonObj.get("potentialNodes").toString())); } if ((jsonObj.get("selectedNode") != null && !jsonObj.get("selectedNode").isJsonNull()) && !jsonObj.get("selectedNode").isJsonPrimitive()) { @@ -217,9 +214,9 @@ public void write(JsonWriter out, V1alpha2PodSchedulingContextSpec value) throws @Override public V1alpha2PodSchedulingContextSpec read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -246,3 +243,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2PodSchedulingContextStatus.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2PodSchedulingContextStatus.java index 76e328f121..7ab85f71f0 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2PodSchedulingContextStatus.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2PodSchedulingContextStatus.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1alpha2ResourceClaimSchedulingStatus; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,17 +52,16 @@ /** * PodSchedulingContextStatus describes where resources for the Pod can be allocated. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha2PodSchedulingContextStatus { public static final String SERIALIZED_NAME_RESOURCE_CLAIMS = "resourceClaims"; @SerializedName(SERIALIZED_NAME_RESOURCE_CLAIMS) - private List resourceClaims; + private List resourceClaims = new ArrayList<>(); public V1alpha2PodSchedulingContextStatus() { } public V1alpha2PodSchedulingContextStatus resourceClaims(List resourceClaims) { - this.resourceClaims = resourceClaims; return this; } @@ -84,7 +83,6 @@ public List getResourceClaims() { return resourceClaims; } - public void setResourceClaims(List resourceClaims) { this.resourceClaims = resourceClaims; } @@ -142,25 +140,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha2PodSchedulingContextStatus + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha2PodSchedulingContextStatus */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha2PodSchedulingContextStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha2PodSchedulingContextStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha2PodSchedulingContextStatus is not found in the empty JSON string", V1alpha2PodSchedulingContextStatus.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha2PodSchedulingContextStatus.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha2PodSchedulingContextStatus` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha2PodSchedulingContextStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (jsonObj.get("resourceClaims") != null && !jsonObj.get("resourceClaims").isJsonNull()) { JsonArray jsonArrayresourceClaims = jsonObj.getAsJsonArray("resourceClaims"); if (jsonArrayresourceClaims != null) { @@ -171,7 +170,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `resourceClaims` (array) for (int i = 0; i < jsonArrayresourceClaims.size(); i++) { - V1alpha2ResourceClaimSchedulingStatus.validateJsonObject(jsonArrayresourceClaims.get(i).getAsJsonObject()); + V1alpha2ResourceClaimSchedulingStatus.validateJsonElement(jsonArrayresourceClaims.get(i)); }; } } @@ -197,9 +196,9 @@ public void write(JsonWriter out, V1alpha2PodSchedulingContextStatus value) thro @Override public V1alpha2PodSchedulingContextStatus read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -226,3 +225,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaim.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaim.java index 18af1386d7..6b417ad04e 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaim.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaim.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1alpha2ResourceClaimSpec; import io.kubernetes.client.openapi.models.V1alpha2ResourceClaimStatus; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * ResourceClaim describes which resources are needed by a resource consumer. Its status tracks whether the resource has been allocated and what the resulting attributes are. This is an alpha type and requires enabling the DynamicResourceAllocation feature gate. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha2ResourceClaim implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -78,7 +78,6 @@ public V1alpha2ResourceClaim() { } public V1alpha2ResourceClaim apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -92,14 +91,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1alpha2ResourceClaim kind(String kind) { - this.kind = kind; return this; } @@ -113,14 +110,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1alpha2ResourceClaim metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -134,14 +129,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V1alpha2ResourceClaim spec(V1alpha2ResourceClaimSpec spec) { - this.spec = spec; return this; } @@ -155,14 +148,12 @@ public V1alpha2ResourceClaimSpec getSpec() { return spec; } - public void setSpec(V1alpha2ResourceClaimSpec spec) { this.spec = spec; } public V1alpha2ResourceClaim status(V1alpha2ResourceClaimStatus status) { - this.status = status; return this; } @@ -176,7 +167,6 @@ public V1alpha2ResourceClaimStatus getStatus() { return status; } - public void setStatus(V1alpha2ResourceClaimStatus status) { this.status = status; } @@ -247,32 +237,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha2ResourceClaim + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha2ResourceClaim */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha2ResourceClaim.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha2ResourceClaim.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha2ResourceClaim is not found in the empty JSON string", V1alpha2ResourceClaim.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha2ResourceClaim.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha2ResourceClaim` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha2ResourceClaim` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1alpha2ResourceClaim.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -281,13 +272,13 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } // validate the required field `spec` - V1alpha2ResourceClaimSpec.validateJsonObject(jsonObj.getAsJsonObject("spec")); + V1alpha2ResourceClaimSpec.validateJsonElement(jsonObj.get("spec")); // validate the optional field `status` if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { - V1alpha2ResourceClaimStatus.validateJsonObject(jsonObj.getAsJsonObject("status")); + V1alpha2ResourceClaimStatus.validateJsonElement(jsonObj.get("status")); } } @@ -311,9 +302,9 @@ public void write(JsonWriter out, V1alpha2ResourceClaim value) throws IOExceptio @Override public V1alpha2ResourceClaim read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -340,3 +331,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimConsumerReference.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimConsumerReference.java index 6c9cf5c954..1f449bd76f 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimConsumerReference.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimConsumerReference.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * ResourceClaimConsumerReference contains enough information to let you locate the consumer of a ResourceClaim. The user must be a resource in the same namespace as the ResourceClaim. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha2ResourceClaimConsumerReference { public static final String SERIALIZED_NAME_API_GROUP = "apiGroup"; @SerializedName(SERIALIZED_NAME_API_GROUP) @@ -71,7 +71,6 @@ public V1alpha2ResourceClaimConsumerReference() { } public V1alpha2ResourceClaimConsumerReference apiGroup(String apiGroup) { - this.apiGroup = apiGroup; return this; } @@ -85,14 +84,12 @@ public String getApiGroup() { return apiGroup; } - public void setApiGroup(String apiGroup) { this.apiGroup = apiGroup; } public V1alpha2ResourceClaimConsumerReference name(String name) { - this.name = name; return this; } @@ -106,14 +103,12 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } public V1alpha2ResourceClaimConsumerReference resource(String resource) { - this.resource = resource; return this; } @@ -127,14 +122,12 @@ public String getResource() { return resource; } - public void setResource(String resource) { this.resource = resource; } public V1alpha2ResourceClaimConsumerReference uid(String uid) { - this.uid = uid; return this; } @@ -148,7 +141,6 @@ public String getUid() { return uid; } - public void setUid(String uid) { this.uid = uid; } @@ -218,32 +210,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha2ResourceClaimConsumerReference + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha2ResourceClaimConsumerReference */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha2ResourceClaimConsumerReference.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha2ResourceClaimConsumerReference.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha2ResourceClaimConsumerReference is not found in the empty JSON string", V1alpha2ResourceClaimConsumerReference.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha2ResourceClaimConsumerReference.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha2ResourceClaimConsumerReference` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha2ResourceClaimConsumerReference` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1alpha2ResourceClaimConsumerReference.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiGroup") != null && !jsonObj.get("apiGroup").isJsonNull()) && !jsonObj.get("apiGroup").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiGroup` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiGroup").toString())); } @@ -278,9 +271,9 @@ public void write(JsonWriter out, V1alpha2ResourceClaimConsumerReference value) @Override public V1alpha2ResourceClaimConsumerReference read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -307,3 +300,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimList.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimList.java index e4edc8a493..323f5f5865 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimList.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimList.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1alpha2ResourceClaim; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * ResourceClaimList is a collection of claims. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha2ResourceClaimList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -75,7 +75,6 @@ public V1alpha2ResourceClaimList() { } public V1alpha2ResourceClaimList apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -89,14 +88,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1alpha2ResourceClaimList items(List items) { - this.items = items; return this; } @@ -118,14 +115,12 @@ public List getItems() { return items; } - public void setItems(List items) { this.items = items; } public V1alpha2ResourceClaimList kind(String kind) { - this.kind = kind; return this; } @@ -139,14 +134,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1alpha2ResourceClaimList metadata(V1ListMeta metadata) { - this.metadata = metadata; return this; } @@ -160,7 +153,6 @@ public V1ListMeta getMetadata() { return metadata; } - public void setMetadata(V1ListMeta metadata) { this.metadata = metadata; } @@ -228,32 +220,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha2ResourceClaimList + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha2ResourceClaimList */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha2ResourceClaimList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha2ResourceClaimList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha2ResourceClaimList is not found in the empty JSON string", V1alpha2ResourceClaimList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha2ResourceClaimList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha2ResourceClaimList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha2ResourceClaimList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1alpha2ResourceClaimList.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -265,14 +258,14 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); // validate the required field `items` (array) for (int i = 0; i < jsonArrayitems.size(); i++) { - V1alpha2ResourceClaim.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject()); + V1alpha2ResourceClaim.validateJsonElement(jsonArrayitems.get(i)); }; if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ListMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ListMeta.validateJsonElement(jsonObj.get("metadata")); } } @@ -296,9 +289,9 @@ public void write(JsonWriter out, V1alpha2ResourceClaimList value) throws IOExce @Override public V1alpha2ResourceClaimList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -325,3 +318,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimParameters.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimParameters.java index 78844557c0..5a90d297cc 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimParameters.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimParameters.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -24,6 +24,7 @@ import io.kubernetes.client.openapi.models.V1alpha2ResourceClaimParametersReference; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -46,7 +47,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -54,7 +54,7 @@ /** * ResourceClaimParameters defines resource requests for a ResourceClaim in an in-tree format understood by Kubernetes. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha2ResourceClaimParameters implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -62,7 +62,7 @@ public class V1alpha2ResourceClaimParameters implements io.kubernetes.client.com public static final String SERIALIZED_NAME_DRIVER_REQUESTS = "driverRequests"; @SerializedName(SERIALIZED_NAME_DRIVER_REQUESTS) - private List driverRequests; + private List driverRequests = new ArrayList<>(); public static final String SERIALIZED_NAME_GENERATED_FROM = "generatedFrom"; @SerializedName(SERIALIZED_NAME_GENERATED_FROM) @@ -84,7 +84,6 @@ public V1alpha2ResourceClaimParameters() { } public V1alpha2ResourceClaimParameters apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -98,14 +97,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1alpha2ResourceClaimParameters driverRequests(List driverRequests) { - this.driverRequests = driverRequests; return this; } @@ -127,14 +124,12 @@ public List getDriverRequests() { return driverRequests; } - public void setDriverRequests(List driverRequests) { this.driverRequests = driverRequests; } public V1alpha2ResourceClaimParameters generatedFrom(V1alpha2ResourceClaimParametersReference generatedFrom) { - this.generatedFrom = generatedFrom; return this; } @@ -148,14 +143,12 @@ public V1alpha2ResourceClaimParametersReference getGeneratedFrom() { return generatedFrom; } - public void setGeneratedFrom(V1alpha2ResourceClaimParametersReference generatedFrom) { this.generatedFrom = generatedFrom; } public V1alpha2ResourceClaimParameters kind(String kind) { - this.kind = kind; return this; } @@ -169,14 +162,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1alpha2ResourceClaimParameters metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -190,14 +181,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V1alpha2ResourceClaimParameters shareable(Boolean shareable) { - this.shareable = shareable; return this; } @@ -211,7 +200,6 @@ public Boolean getShareable() { return shareable; } - public void setShareable(Boolean shareable) { this.shareable = shareable; } @@ -284,25 +272,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha2ResourceClaimParameters + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha2ResourceClaimParameters */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha2ResourceClaimParameters.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha2ResourceClaimParameters.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha2ResourceClaimParameters is not found in the empty JSON string", V1alpha2ResourceClaimParameters.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha2ResourceClaimParameters.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha2ResourceClaimParameters` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha2ResourceClaimParameters` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -316,20 +305,20 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `driverRequests` (array) for (int i = 0; i < jsonArraydriverRequests.size(); i++) { - V1alpha2DriverRequests.validateJsonObject(jsonArraydriverRequests.get(i).getAsJsonObject()); + V1alpha2DriverRequests.validateJsonElement(jsonArraydriverRequests.get(i)); }; } } // validate the optional field `generatedFrom` if (jsonObj.get("generatedFrom") != null && !jsonObj.get("generatedFrom").isJsonNull()) { - V1alpha2ResourceClaimParametersReference.validateJsonObject(jsonObj.getAsJsonObject("generatedFrom")); + V1alpha2ResourceClaimParametersReference.validateJsonElement(jsonObj.get("generatedFrom")); } if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } } @@ -353,9 +342,9 @@ public void write(JsonWriter out, V1alpha2ResourceClaimParameters value) throws @Override public V1alpha2ResourceClaimParameters read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -382,3 +371,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimParametersList.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimParametersList.java index 6f1e4ec62d..d571c252bb 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimParametersList.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimParametersList.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1alpha2ResourceClaimParameters; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * ResourceClaimParametersList is a collection of ResourceClaimParameters. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha2ResourceClaimParametersList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -75,7 +75,6 @@ public V1alpha2ResourceClaimParametersList() { } public V1alpha2ResourceClaimParametersList apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -89,14 +88,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1alpha2ResourceClaimParametersList items(List items) { - this.items = items; return this; } @@ -118,14 +115,12 @@ public List getItems() { return items; } - public void setItems(List items) { this.items = items; } public V1alpha2ResourceClaimParametersList kind(String kind) { - this.kind = kind; return this; } @@ -139,14 +134,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1alpha2ResourceClaimParametersList metadata(V1ListMeta metadata) { - this.metadata = metadata; return this; } @@ -160,7 +153,6 @@ public V1ListMeta getMetadata() { return metadata; } - public void setMetadata(V1ListMeta metadata) { this.metadata = metadata; } @@ -228,32 +220,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha2ResourceClaimParametersList + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha2ResourceClaimParametersList */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha2ResourceClaimParametersList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha2ResourceClaimParametersList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha2ResourceClaimParametersList is not found in the empty JSON string", V1alpha2ResourceClaimParametersList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha2ResourceClaimParametersList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha2ResourceClaimParametersList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha2ResourceClaimParametersList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1alpha2ResourceClaimParametersList.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -265,14 +258,14 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); // validate the required field `items` (array) for (int i = 0; i < jsonArrayitems.size(); i++) { - V1alpha2ResourceClaimParameters.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject()); + V1alpha2ResourceClaimParameters.validateJsonElement(jsonArrayitems.get(i)); }; if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ListMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ListMeta.validateJsonElement(jsonObj.get("metadata")); } } @@ -296,9 +289,9 @@ public void write(JsonWriter out, V1alpha2ResourceClaimParametersList value) thr @Override public V1alpha2ResourceClaimParametersList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -325,3 +318,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimParametersReference.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimParametersReference.java index f01500a68d..b3f0714612 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimParametersReference.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimParametersReference.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * ResourceClaimParametersReference contains enough information to let you locate the parameters for a ResourceClaim. The object must be in the same namespace as the ResourceClaim. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha2ResourceClaimParametersReference { public static final String SERIALIZED_NAME_API_GROUP = "apiGroup"; @SerializedName(SERIALIZED_NAME_API_GROUP) @@ -67,7 +67,6 @@ public V1alpha2ResourceClaimParametersReference() { } public V1alpha2ResourceClaimParametersReference apiGroup(String apiGroup) { - this.apiGroup = apiGroup; return this; } @@ -81,14 +80,12 @@ public String getApiGroup() { return apiGroup; } - public void setApiGroup(String apiGroup) { this.apiGroup = apiGroup; } public V1alpha2ResourceClaimParametersReference kind(String kind) { - this.kind = kind; return this; } @@ -102,14 +99,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1alpha2ResourceClaimParametersReference name(String name) { - this.name = name; return this; } @@ -123,7 +118,6 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } @@ -189,32 +183,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha2ResourceClaimParametersReference + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha2ResourceClaimParametersReference */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha2ResourceClaimParametersReference.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha2ResourceClaimParametersReference.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha2ResourceClaimParametersReference is not found in the empty JSON string", V1alpha2ResourceClaimParametersReference.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha2ResourceClaimParametersReference.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha2ResourceClaimParametersReference` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha2ResourceClaimParametersReference` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1alpha2ResourceClaimParametersReference.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiGroup") != null && !jsonObj.get("apiGroup").isJsonNull()) && !jsonObj.get("apiGroup").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiGroup` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiGroup").toString())); } @@ -246,9 +241,9 @@ public void write(JsonWriter out, V1alpha2ResourceClaimParametersReference value @Override public V1alpha2ResourceClaimParametersReference read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -275,3 +270,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimSchedulingStatus.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimSchedulingStatus.java index b935a50a3b..7e3894215d 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimSchedulingStatus.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimSchedulingStatus.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -43,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -51,7 +51,7 @@ /** * ResourceClaimSchedulingStatus contains information about one particular ResourceClaim with \"WaitForFirstConsumer\" allocation mode. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha2ResourceClaimSchedulingStatus { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) @@ -59,13 +59,12 @@ public class V1alpha2ResourceClaimSchedulingStatus { public static final String SERIALIZED_NAME_UNSUITABLE_NODES = "unsuitableNodes"; @SerializedName(SERIALIZED_NAME_UNSUITABLE_NODES) - private List unsuitableNodes; + private List unsuitableNodes = new ArrayList<>(); public V1alpha2ResourceClaimSchedulingStatus() { } public V1alpha2ResourceClaimSchedulingStatus name(String name) { - this.name = name; return this; } @@ -79,14 +78,12 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } public V1alpha2ResourceClaimSchedulingStatus unsuitableNodes(List unsuitableNodes) { - this.unsuitableNodes = unsuitableNodes; return this; } @@ -108,7 +105,6 @@ public List getUnsuitableNodes() { return unsuitableNodes; } - public void setUnsuitableNodes(List unsuitableNodes) { this.unsuitableNodes = unsuitableNodes; } @@ -169,30 +165,31 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha2ResourceClaimSchedulingStatus + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha2ResourceClaimSchedulingStatus */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha2ResourceClaimSchedulingStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha2ResourceClaimSchedulingStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha2ResourceClaimSchedulingStatus is not found in the empty JSON string", V1alpha2ResourceClaimSchedulingStatus.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha2ResourceClaimSchedulingStatus.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha2ResourceClaimSchedulingStatus` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha2ResourceClaimSchedulingStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("unsuitableNodes") != null && !jsonObj.get("unsuitableNodes").isJsonArray()) { + if (jsonObj.get("unsuitableNodes") != null && !jsonObj.get("unsuitableNodes").isJsonNull() && !jsonObj.get("unsuitableNodes").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `unsuitableNodes` to be an array in the JSON string but got `%s`", jsonObj.get("unsuitableNodes").toString())); } } @@ -217,9 +214,9 @@ public void write(JsonWriter out, V1alpha2ResourceClaimSchedulingStatus value) t @Override public V1alpha2ResourceClaimSchedulingStatus read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -246,3 +243,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimSpec.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimSpec.java index c6eb884a8d..96c6959e02 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimSpec.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimSpec.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.openapi.models.V1alpha2ResourceClaimParametersReference; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * ResourceClaimSpec defines how a resource is to be allocated. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha2ResourceClaimSpec { public static final String SERIALIZED_NAME_ALLOCATION_MODE = "allocationMode"; @SerializedName(SERIALIZED_NAME_ALLOCATION_MODE) @@ -68,7 +68,6 @@ public V1alpha2ResourceClaimSpec() { } public V1alpha2ResourceClaimSpec allocationMode(String allocationMode) { - this.allocationMode = allocationMode; return this; } @@ -82,14 +81,12 @@ public String getAllocationMode() { return allocationMode; } - public void setAllocationMode(String allocationMode) { this.allocationMode = allocationMode; } public V1alpha2ResourceClaimSpec parametersRef(V1alpha2ResourceClaimParametersReference parametersRef) { - this.parametersRef = parametersRef; return this; } @@ -103,14 +100,12 @@ public V1alpha2ResourceClaimParametersReference getParametersRef() { return parametersRef; } - public void setParametersRef(V1alpha2ResourceClaimParametersReference parametersRef) { this.parametersRef = parametersRef; } public V1alpha2ResourceClaimSpec resourceClassName(String resourceClassName) { - this.resourceClassName = resourceClassName; return this; } @@ -124,7 +119,6 @@ public String getResourceClassName() { return resourceClassName; } - public void setResourceClassName(String resourceClassName) { this.resourceClassName = resourceClassName; } @@ -189,38 +183,39 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha2ResourceClaimSpec + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha2ResourceClaimSpec */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha2ResourceClaimSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha2ResourceClaimSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha2ResourceClaimSpec is not found in the empty JSON string", V1alpha2ResourceClaimSpec.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha2ResourceClaimSpec.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha2ResourceClaimSpec` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha2ResourceClaimSpec` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1alpha2ResourceClaimSpec.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("allocationMode") != null && !jsonObj.get("allocationMode").isJsonNull()) && !jsonObj.get("allocationMode").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `allocationMode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("allocationMode").toString())); } // validate the optional field `parametersRef` if (jsonObj.get("parametersRef") != null && !jsonObj.get("parametersRef").isJsonNull()) { - V1alpha2ResourceClaimParametersReference.validateJsonObject(jsonObj.getAsJsonObject("parametersRef")); + V1alpha2ResourceClaimParametersReference.validateJsonElement(jsonObj.get("parametersRef")); } if (!jsonObj.get("resourceClassName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `resourceClassName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("resourceClassName").toString())); @@ -247,9 +242,9 @@ public void write(JsonWriter out, V1alpha2ResourceClaimSpec value) throws IOExce @Override public V1alpha2ResourceClaimSpec read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -276,3 +271,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimStatus.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimStatus.java index 91b4917b75..1215469c7b 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimStatus.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimStatus.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1alpha2ResourceClaimConsumerReference; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * ResourceClaimStatus tracks whether the resource has been allocated and what the resulting attributes are. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha2ResourceClaimStatus { public static final String SERIALIZED_NAME_ALLOCATION = "allocation"; @SerializedName(SERIALIZED_NAME_ALLOCATION) @@ -69,13 +69,12 @@ public class V1alpha2ResourceClaimStatus { public static final String SERIALIZED_NAME_RESERVED_FOR = "reservedFor"; @SerializedName(SERIALIZED_NAME_RESERVED_FOR) - private List reservedFor; + private List reservedFor = new ArrayList<>(); public V1alpha2ResourceClaimStatus() { } public V1alpha2ResourceClaimStatus allocation(V1alpha2AllocationResult allocation) { - this.allocation = allocation; return this; } @@ -89,14 +88,12 @@ public V1alpha2AllocationResult getAllocation() { return allocation; } - public void setAllocation(V1alpha2AllocationResult allocation) { this.allocation = allocation; } public V1alpha2ResourceClaimStatus deallocationRequested(Boolean deallocationRequested) { - this.deallocationRequested = deallocationRequested; return this; } @@ -110,14 +107,12 @@ public Boolean getDeallocationRequested() { return deallocationRequested; } - public void setDeallocationRequested(Boolean deallocationRequested) { this.deallocationRequested = deallocationRequested; } public V1alpha2ResourceClaimStatus driverName(String driverName) { - this.driverName = driverName; return this; } @@ -131,14 +126,12 @@ public String getDriverName() { return driverName; } - public void setDriverName(String driverName) { this.driverName = driverName; } public V1alpha2ResourceClaimStatus reservedFor(List reservedFor) { - this.reservedFor = reservedFor; return this; } @@ -160,7 +153,6 @@ public List getReservedFor() { return reservedFor; } - public void setReservedFor(List reservedFor) { this.reservedFor = reservedFor; } @@ -227,28 +219,29 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha2ResourceClaimStatus + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha2ResourceClaimStatus */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha2ResourceClaimStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha2ResourceClaimStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha2ResourceClaimStatus is not found in the empty JSON string", V1alpha2ResourceClaimStatus.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha2ResourceClaimStatus.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha2ResourceClaimStatus` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha2ResourceClaimStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `allocation` if (jsonObj.get("allocation") != null && !jsonObj.get("allocation").isJsonNull()) { - V1alpha2AllocationResult.validateJsonObject(jsonObj.getAsJsonObject("allocation")); + V1alpha2AllocationResult.validateJsonElement(jsonObj.get("allocation")); } if ((jsonObj.get("driverName") != null && !jsonObj.get("driverName").isJsonNull()) && !jsonObj.get("driverName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `driverName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("driverName").toString())); @@ -263,7 +256,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `reservedFor` (array) for (int i = 0; i < jsonArrayreservedFor.size(); i++) { - V1alpha2ResourceClaimConsumerReference.validateJsonObject(jsonArrayreservedFor.get(i).getAsJsonObject()); + V1alpha2ResourceClaimConsumerReference.validateJsonElement(jsonArrayreservedFor.get(i)); }; } } @@ -289,9 +282,9 @@ public void write(JsonWriter out, V1alpha2ResourceClaimStatus value) throws IOEx @Override public V1alpha2ResourceClaimStatus read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -318,3 +311,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimTemplate.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimTemplate.java index fce6d7156d..d8096b7557 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimTemplate.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimTemplate.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1ObjectMeta; import io.kubernetes.client.openapi.models.V1alpha2ResourceClaimTemplateSpec; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -43,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -51,7 +51,7 @@ /** * ResourceClaimTemplate is used to produce ResourceClaim objects. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha2ResourceClaimTemplate implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -73,7 +73,6 @@ public V1alpha2ResourceClaimTemplate() { } public V1alpha2ResourceClaimTemplate apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -87,14 +86,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1alpha2ResourceClaimTemplate kind(String kind) { - this.kind = kind; return this; } @@ -108,14 +105,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1alpha2ResourceClaimTemplate metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -129,14 +124,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V1alpha2ResourceClaimTemplate spec(V1alpha2ResourceClaimTemplateSpec spec) { - this.spec = spec; return this; } @@ -150,7 +143,6 @@ public V1alpha2ResourceClaimTemplateSpec getSpec() { return spec; } - public void setSpec(V1alpha2ResourceClaimTemplateSpec spec) { this.spec = spec; } @@ -218,32 +210,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha2ResourceClaimTemplate + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha2ResourceClaimTemplate */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha2ResourceClaimTemplate.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha2ResourceClaimTemplate.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha2ResourceClaimTemplate is not found in the empty JSON string", V1alpha2ResourceClaimTemplate.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha2ResourceClaimTemplate.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha2ResourceClaimTemplate` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha2ResourceClaimTemplate` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1alpha2ResourceClaimTemplate.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -252,10 +245,10 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } // validate the required field `spec` - V1alpha2ResourceClaimTemplateSpec.validateJsonObject(jsonObj.getAsJsonObject("spec")); + V1alpha2ResourceClaimTemplateSpec.validateJsonElement(jsonObj.get("spec")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -278,9 +271,9 @@ public void write(JsonWriter out, V1alpha2ResourceClaimTemplate value) throws IO @Override public V1alpha2ResourceClaimTemplate read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -307,3 +300,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimTemplateList.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimTemplateList.java index 1a86dc890c..9b12fe3853 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimTemplateList.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimTemplateList.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1alpha2ResourceClaimTemplate; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * ResourceClaimTemplateList is a collection of claim templates. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha2ResourceClaimTemplateList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -75,7 +75,6 @@ public V1alpha2ResourceClaimTemplateList() { } public V1alpha2ResourceClaimTemplateList apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -89,14 +88,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1alpha2ResourceClaimTemplateList items(List items) { - this.items = items; return this; } @@ -118,14 +115,12 @@ public List getItems() { return items; } - public void setItems(List items) { this.items = items; } public V1alpha2ResourceClaimTemplateList kind(String kind) { - this.kind = kind; return this; } @@ -139,14 +134,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1alpha2ResourceClaimTemplateList metadata(V1ListMeta metadata) { - this.metadata = metadata; return this; } @@ -160,7 +153,6 @@ public V1ListMeta getMetadata() { return metadata; } - public void setMetadata(V1ListMeta metadata) { this.metadata = metadata; } @@ -228,32 +220,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha2ResourceClaimTemplateList + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha2ResourceClaimTemplateList */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha2ResourceClaimTemplateList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha2ResourceClaimTemplateList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha2ResourceClaimTemplateList is not found in the empty JSON string", V1alpha2ResourceClaimTemplateList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha2ResourceClaimTemplateList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha2ResourceClaimTemplateList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha2ResourceClaimTemplateList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1alpha2ResourceClaimTemplateList.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -265,14 +258,14 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); // validate the required field `items` (array) for (int i = 0; i < jsonArrayitems.size(); i++) { - V1alpha2ResourceClaimTemplate.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject()); + V1alpha2ResourceClaimTemplate.validateJsonElement(jsonArrayitems.get(i)); }; if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ListMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ListMeta.validateJsonElement(jsonObj.get("metadata")); } } @@ -296,9 +289,9 @@ public void write(JsonWriter out, V1alpha2ResourceClaimTemplateList value) throw @Override public V1alpha2ResourceClaimTemplateList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -325,3 +318,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimTemplateSpec.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimTemplateSpec.java index 7c2b850f81..3939ac7066 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimTemplateSpec.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimTemplateSpec.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1ObjectMeta; import io.kubernetes.client.openapi.models.V1alpha2ResourceClaimSpec; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -43,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -51,7 +51,7 @@ /** * ResourceClaimTemplateSpec contains the metadata and fields for a ResourceClaim. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha2ResourceClaimTemplateSpec { public static final String SERIALIZED_NAME_METADATA = "metadata"; @SerializedName(SERIALIZED_NAME_METADATA) @@ -65,7 +65,6 @@ public V1alpha2ResourceClaimTemplateSpec() { } public V1alpha2ResourceClaimTemplateSpec metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -79,14 +78,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V1alpha2ResourceClaimTemplateSpec spec(V1alpha2ResourceClaimSpec spec) { - this.spec = spec; return this; } @@ -100,7 +97,6 @@ public V1alpha2ResourceClaimSpec getSpec() { return spec; } - public void setSpec(V1alpha2ResourceClaimSpec spec) { this.spec = spec; } @@ -162,38 +158,39 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha2ResourceClaimTemplateSpec + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha2ResourceClaimTemplateSpec */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha2ResourceClaimTemplateSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha2ResourceClaimTemplateSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha2ResourceClaimTemplateSpec is not found in the empty JSON string", V1alpha2ResourceClaimTemplateSpec.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha2ResourceClaimTemplateSpec.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha2ResourceClaimTemplateSpec` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha2ResourceClaimTemplateSpec` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1alpha2ResourceClaimTemplateSpec.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } // validate the required field `spec` - V1alpha2ResourceClaimSpec.validateJsonObject(jsonObj.getAsJsonObject("spec")); + V1alpha2ResourceClaimSpec.validateJsonElement(jsonObj.get("spec")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -216,9 +213,9 @@ public void write(JsonWriter out, V1alpha2ResourceClaimTemplateSpec value) throw @Override public V1alpha2ResourceClaimTemplateSpec read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -245,3 +242,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClass.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClass.java index 9d1e68a9e1..096368b2b5 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClass.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClass.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1ObjectMeta; import io.kubernetes.client.openapi.models.V1alpha2ResourceClassParametersReference; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * ResourceClass is used by administrators to influence how resources are allocated. This is an alpha type and requires enabling the DynamicResourceAllocation feature gate. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha2ResourceClass implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -86,7 +86,6 @@ public V1alpha2ResourceClass() { } public V1alpha2ResourceClass apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -100,14 +99,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1alpha2ResourceClass driverName(String driverName) { - this.driverName = driverName; return this; } @@ -121,14 +118,12 @@ public String getDriverName() { return driverName; } - public void setDriverName(String driverName) { this.driverName = driverName; } public V1alpha2ResourceClass kind(String kind) { - this.kind = kind; return this; } @@ -142,14 +137,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1alpha2ResourceClass metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -163,14 +156,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V1alpha2ResourceClass parametersRef(V1alpha2ResourceClassParametersReference parametersRef) { - this.parametersRef = parametersRef; return this; } @@ -184,14 +175,12 @@ public V1alpha2ResourceClassParametersReference getParametersRef() { return parametersRef; } - public void setParametersRef(V1alpha2ResourceClassParametersReference parametersRef) { this.parametersRef = parametersRef; } public V1alpha2ResourceClass structuredParameters(Boolean structuredParameters) { - this.structuredParameters = structuredParameters; return this; } @@ -205,14 +194,12 @@ public Boolean getStructuredParameters() { return structuredParameters; } - public void setStructuredParameters(Boolean structuredParameters) { this.structuredParameters = structuredParameters; } public V1alpha2ResourceClass suitableNodes(V1NodeSelector suitableNodes) { - this.suitableNodes = suitableNodes; return this; } @@ -226,7 +213,6 @@ public V1NodeSelector getSuitableNodes() { return suitableNodes; } - public void setSuitableNodes(V1NodeSelector suitableNodes) { this.suitableNodes = suitableNodes; } @@ -303,32 +289,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha2ResourceClass + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha2ResourceClass */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha2ResourceClass.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha2ResourceClass.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha2ResourceClass is not found in the empty JSON string", V1alpha2ResourceClass.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha2ResourceClass.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha2ResourceClass` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha2ResourceClass` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1alpha2ResourceClass.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -340,15 +327,15 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } // validate the optional field `parametersRef` if (jsonObj.get("parametersRef") != null && !jsonObj.get("parametersRef").isJsonNull()) { - V1alpha2ResourceClassParametersReference.validateJsonObject(jsonObj.getAsJsonObject("parametersRef")); + V1alpha2ResourceClassParametersReference.validateJsonElement(jsonObj.get("parametersRef")); } // validate the optional field `suitableNodes` if (jsonObj.get("suitableNodes") != null && !jsonObj.get("suitableNodes").isJsonNull()) { - V1NodeSelector.validateJsonObject(jsonObj.getAsJsonObject("suitableNodes")); + V1NodeSelector.validateJsonElement(jsonObj.get("suitableNodes")); } } @@ -372,9 +359,9 @@ public void write(JsonWriter out, V1alpha2ResourceClass value) throws IOExceptio @Override public V1alpha2ResourceClass read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -401,3 +388,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClassList.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClassList.java index 0adf241792..8ff80f7e32 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClassList.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClassList.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1alpha2ResourceClass; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * ResourceClassList is a collection of classes. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha2ResourceClassList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -75,7 +75,6 @@ public V1alpha2ResourceClassList() { } public V1alpha2ResourceClassList apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -89,14 +88,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1alpha2ResourceClassList items(List items) { - this.items = items; return this; } @@ -118,14 +115,12 @@ public List getItems() { return items; } - public void setItems(List items) { this.items = items; } public V1alpha2ResourceClassList kind(String kind) { - this.kind = kind; return this; } @@ -139,14 +134,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1alpha2ResourceClassList metadata(V1ListMeta metadata) { - this.metadata = metadata; return this; } @@ -160,7 +153,6 @@ public V1ListMeta getMetadata() { return metadata; } - public void setMetadata(V1ListMeta metadata) { this.metadata = metadata; } @@ -228,32 +220,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha2ResourceClassList + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha2ResourceClassList */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha2ResourceClassList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha2ResourceClassList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha2ResourceClassList is not found in the empty JSON string", V1alpha2ResourceClassList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha2ResourceClassList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha2ResourceClassList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha2ResourceClassList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1alpha2ResourceClassList.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -265,14 +258,14 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); // validate the required field `items` (array) for (int i = 0; i < jsonArrayitems.size(); i++) { - V1alpha2ResourceClass.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject()); + V1alpha2ResourceClass.validateJsonElement(jsonArrayitems.get(i)); }; if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ListMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ListMeta.validateJsonElement(jsonObj.get("metadata")); } } @@ -296,9 +289,9 @@ public void write(JsonWriter out, V1alpha2ResourceClassList value) throws IOExce @Override public V1alpha2ResourceClassList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -325,3 +318,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClassParameters.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClassParameters.java index 6333e3173b..d01f197ba4 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClassParameters.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClassParameters.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -25,6 +25,7 @@ import io.kubernetes.client.openapi.models.V1alpha2VendorParameters; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -47,7 +48,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -55,7 +55,7 @@ /** * ResourceClassParameters defines resource requests for a ResourceClass in an in-tree format understood by Kubernetes. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha2ResourceClassParameters implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -63,7 +63,7 @@ public class V1alpha2ResourceClassParameters implements io.kubernetes.client.com public static final String SERIALIZED_NAME_FILTERS = "filters"; @SerializedName(SERIALIZED_NAME_FILTERS) - private List filters; + private List filters = new ArrayList<>(); public static final String SERIALIZED_NAME_GENERATED_FROM = "generatedFrom"; @SerializedName(SERIALIZED_NAME_GENERATED_FROM) @@ -79,13 +79,12 @@ public class V1alpha2ResourceClassParameters implements io.kubernetes.client.com public static final String SERIALIZED_NAME_VENDOR_PARAMETERS = "vendorParameters"; @SerializedName(SERIALIZED_NAME_VENDOR_PARAMETERS) - private List vendorParameters; + private List vendorParameters = new ArrayList<>(); public V1alpha2ResourceClassParameters() { } public V1alpha2ResourceClassParameters apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -99,14 +98,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1alpha2ResourceClassParameters filters(List filters) { - this.filters = filters; return this; } @@ -128,14 +125,12 @@ public List getFilters() { return filters; } - public void setFilters(List filters) { this.filters = filters; } public V1alpha2ResourceClassParameters generatedFrom(V1alpha2ResourceClassParametersReference generatedFrom) { - this.generatedFrom = generatedFrom; return this; } @@ -149,14 +144,12 @@ public V1alpha2ResourceClassParametersReference getGeneratedFrom() { return generatedFrom; } - public void setGeneratedFrom(V1alpha2ResourceClassParametersReference generatedFrom) { this.generatedFrom = generatedFrom; } public V1alpha2ResourceClassParameters kind(String kind) { - this.kind = kind; return this; } @@ -170,14 +163,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1alpha2ResourceClassParameters metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -191,14 +182,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V1alpha2ResourceClassParameters vendorParameters(List vendorParameters) { - this.vendorParameters = vendorParameters; return this; } @@ -220,7 +209,6 @@ public List getVendorParameters() { return vendorParameters; } - public void setVendorParameters(List vendorParameters) { this.vendorParameters = vendorParameters; } @@ -293,25 +281,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha2ResourceClassParameters + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha2ResourceClassParameters */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha2ResourceClassParameters.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha2ResourceClassParameters.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha2ResourceClassParameters is not found in the empty JSON string", V1alpha2ResourceClassParameters.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha2ResourceClassParameters.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha2ResourceClassParameters` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha2ResourceClassParameters` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -325,20 +314,20 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `filters` (array) for (int i = 0; i < jsonArrayfilters.size(); i++) { - V1alpha2ResourceFilter.validateJsonObject(jsonArrayfilters.get(i).getAsJsonObject()); + V1alpha2ResourceFilter.validateJsonElement(jsonArrayfilters.get(i)); }; } } // validate the optional field `generatedFrom` if (jsonObj.get("generatedFrom") != null && !jsonObj.get("generatedFrom").isJsonNull()) { - V1alpha2ResourceClassParametersReference.validateJsonObject(jsonObj.getAsJsonObject("generatedFrom")); + V1alpha2ResourceClassParametersReference.validateJsonElement(jsonObj.get("generatedFrom")); } if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } if (jsonObj.get("vendorParameters") != null && !jsonObj.get("vendorParameters").isJsonNull()) { JsonArray jsonArrayvendorParameters = jsonObj.getAsJsonArray("vendorParameters"); @@ -350,7 +339,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `vendorParameters` (array) for (int i = 0; i < jsonArrayvendorParameters.size(); i++) { - V1alpha2VendorParameters.validateJsonObject(jsonArrayvendorParameters.get(i).getAsJsonObject()); + V1alpha2VendorParameters.validateJsonElement(jsonArrayvendorParameters.get(i)); }; } } @@ -376,9 +365,9 @@ public void write(JsonWriter out, V1alpha2ResourceClassParameters value) throws @Override public V1alpha2ResourceClassParameters read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -405,3 +394,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClassParametersList.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClassParametersList.java index cafe6a23e6..20cff744e2 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClassParametersList.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClassParametersList.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1alpha2ResourceClassParameters; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * ResourceClassParametersList is a collection of ResourceClassParameters. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha2ResourceClassParametersList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -75,7 +75,6 @@ public V1alpha2ResourceClassParametersList() { } public V1alpha2ResourceClassParametersList apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -89,14 +88,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1alpha2ResourceClassParametersList items(List items) { - this.items = items; return this; } @@ -118,14 +115,12 @@ public List getItems() { return items; } - public void setItems(List items) { this.items = items; } public V1alpha2ResourceClassParametersList kind(String kind) { - this.kind = kind; return this; } @@ -139,14 +134,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1alpha2ResourceClassParametersList metadata(V1ListMeta metadata) { - this.metadata = metadata; return this; } @@ -160,7 +153,6 @@ public V1ListMeta getMetadata() { return metadata; } - public void setMetadata(V1ListMeta metadata) { this.metadata = metadata; } @@ -228,32 +220,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha2ResourceClassParametersList + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha2ResourceClassParametersList */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha2ResourceClassParametersList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha2ResourceClassParametersList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha2ResourceClassParametersList is not found in the empty JSON string", V1alpha2ResourceClassParametersList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha2ResourceClassParametersList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha2ResourceClassParametersList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha2ResourceClassParametersList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1alpha2ResourceClassParametersList.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -265,14 +258,14 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); // validate the required field `items` (array) for (int i = 0; i < jsonArrayitems.size(); i++) { - V1alpha2ResourceClassParameters.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject()); + V1alpha2ResourceClassParameters.validateJsonElement(jsonArrayitems.get(i)); }; if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ListMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ListMeta.validateJsonElement(jsonObj.get("metadata")); } } @@ -296,9 +289,9 @@ public void write(JsonWriter out, V1alpha2ResourceClassParametersList value) thr @Override public V1alpha2ResourceClassParametersList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -325,3 +318,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClassParametersReference.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClassParametersReference.java index ee4c0d815c..8b29f4460b 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClassParametersReference.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClassParametersReference.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * ResourceClassParametersReference contains enough information to let you locate the parameters for a ResourceClass. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha2ResourceClassParametersReference { public static final String SERIALIZED_NAME_API_GROUP = "apiGroup"; @SerializedName(SERIALIZED_NAME_API_GROUP) @@ -71,7 +71,6 @@ public V1alpha2ResourceClassParametersReference() { } public V1alpha2ResourceClassParametersReference apiGroup(String apiGroup) { - this.apiGroup = apiGroup; return this; } @@ -85,14 +84,12 @@ public String getApiGroup() { return apiGroup; } - public void setApiGroup(String apiGroup) { this.apiGroup = apiGroup; } public V1alpha2ResourceClassParametersReference kind(String kind) { - this.kind = kind; return this; } @@ -106,14 +103,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1alpha2ResourceClassParametersReference name(String name) { - this.name = name; return this; } @@ -127,14 +122,12 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } public V1alpha2ResourceClassParametersReference namespace(String namespace) { - this.namespace = namespace; return this; } @@ -148,7 +141,6 @@ public String getNamespace() { return namespace; } - public void setNamespace(String namespace) { this.namespace = namespace; } @@ -217,32 +209,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha2ResourceClassParametersReference + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha2ResourceClassParametersReference */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha2ResourceClassParametersReference.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha2ResourceClassParametersReference.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha2ResourceClassParametersReference is not found in the empty JSON string", V1alpha2ResourceClassParametersReference.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha2ResourceClassParametersReference.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha2ResourceClassParametersReference` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha2ResourceClassParametersReference` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1alpha2ResourceClassParametersReference.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiGroup") != null && !jsonObj.get("apiGroup").isJsonNull()) && !jsonObj.get("apiGroup").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiGroup` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiGroup").toString())); } @@ -277,9 +270,9 @@ public void write(JsonWriter out, V1alpha2ResourceClassParametersReference value @Override public V1alpha2ResourceClassParametersReference read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -306,3 +299,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceFilter.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceFilter.java index 0bb070cb1b..fd3175aa6a 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceFilter.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceFilter.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.openapi.models.V1alpha2NamedResourcesFilter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * ResourceFilter is a filter for resources from one particular driver. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha2ResourceFilter { public static final String SERIALIZED_NAME_DRIVER_NAME = "driverName"; @SerializedName(SERIALIZED_NAME_DRIVER_NAME) @@ -64,7 +64,6 @@ public V1alpha2ResourceFilter() { } public V1alpha2ResourceFilter driverName(String driverName) { - this.driverName = driverName; return this; } @@ -78,14 +77,12 @@ public String getDriverName() { return driverName; } - public void setDriverName(String driverName) { this.driverName = driverName; } public V1alpha2ResourceFilter namedResources(V1alpha2NamedResourcesFilter namedResources) { - this.namedResources = namedResources; return this; } @@ -99,7 +96,6 @@ public V1alpha2NamedResourcesFilter getNamedResources() { return namedResources; } - public void setNamedResources(V1alpha2NamedResourcesFilter namedResources) { this.namedResources = namedResources; } @@ -160,31 +156,32 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha2ResourceFilter + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha2ResourceFilter */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha2ResourceFilter.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha2ResourceFilter.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha2ResourceFilter is not found in the empty JSON string", V1alpha2ResourceFilter.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha2ResourceFilter.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha2ResourceFilter` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha2ResourceFilter` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("driverName") != null && !jsonObj.get("driverName").isJsonNull()) && !jsonObj.get("driverName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `driverName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("driverName").toString())); } // validate the optional field `namedResources` if (jsonObj.get("namedResources") != null && !jsonObj.get("namedResources").isJsonNull()) { - V1alpha2NamedResourcesFilter.validateJsonObject(jsonObj.getAsJsonObject("namedResources")); + V1alpha2NamedResourcesFilter.validateJsonElement(jsonObj.get("namedResources")); } } @@ -208,9 +205,9 @@ public void write(JsonWriter out, V1alpha2ResourceFilter value) throws IOExcepti @Override public V1alpha2ResourceFilter read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -237,3 +234,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceHandle.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceHandle.java index 2320dca7fc..7c0dd2df64 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceHandle.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceHandle.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.openapi.models.V1alpha2StructuredResourceHandle; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * ResourceHandle holds opaque resource data for processing by a specific kubelet plugin. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha2ResourceHandle { public static final String SERIALIZED_NAME_DATA = "data"; @SerializedName(SERIALIZED_NAME_DATA) @@ -68,7 +68,6 @@ public V1alpha2ResourceHandle() { } public V1alpha2ResourceHandle data(String data) { - this.data = data; return this; } @@ -82,14 +81,12 @@ public String getData() { return data; } - public void setData(String data) { this.data = data; } public V1alpha2ResourceHandle driverName(String driverName) { - this.driverName = driverName; return this; } @@ -103,14 +100,12 @@ public String getDriverName() { return driverName; } - public void setDriverName(String driverName) { this.driverName = driverName; } public V1alpha2ResourceHandle structuredData(V1alpha2StructuredResourceHandle structuredData) { - this.structuredData = structuredData; return this; } @@ -124,7 +119,6 @@ public V1alpha2StructuredResourceHandle getStructuredData() { return structuredData; } - public void setStructuredData(V1alpha2StructuredResourceHandle structuredData) { this.structuredData = structuredData; } @@ -188,25 +182,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha2ResourceHandle + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha2ResourceHandle */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha2ResourceHandle.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha2ResourceHandle.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha2ResourceHandle is not found in the empty JSON string", V1alpha2ResourceHandle.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha2ResourceHandle.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha2ResourceHandle` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha2ResourceHandle` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) && !jsonObj.get("data").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `data` to be a primitive type in the JSON string but got `%s`", jsonObj.get("data").toString())); } @@ -215,7 +210,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `structuredData` if (jsonObj.get("structuredData") != null && !jsonObj.get("structuredData").isJsonNull()) { - V1alpha2StructuredResourceHandle.validateJsonObject(jsonObj.getAsJsonObject("structuredData")); + V1alpha2StructuredResourceHandle.validateJsonElement(jsonObj.get("structuredData")); } } @@ -239,9 +234,9 @@ public void write(JsonWriter out, V1alpha2ResourceHandle value) throws IOExcepti @Override public V1alpha2ResourceHandle read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -268,3 +263,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceRequest.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceRequest.java index acc16865d2..32bf6f8a32 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceRequest.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceRequest.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.openapi.models.V1alpha2NamedResourcesRequest; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * ResourceRequest is a request for resources from one particular driver. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha2ResourceRequest { public static final String SERIALIZED_NAME_NAMED_RESOURCES = "namedResources"; @SerializedName(SERIALIZED_NAME_NAMED_RESOURCES) @@ -64,7 +64,6 @@ public V1alpha2ResourceRequest() { } public V1alpha2ResourceRequest namedResources(V1alpha2NamedResourcesRequest namedResources) { - this.namedResources = namedResources; return this; } @@ -78,14 +77,12 @@ public V1alpha2NamedResourcesRequest getNamedResources() { return namedResources; } - public void setNamedResources(V1alpha2NamedResourcesRequest namedResources) { this.namedResources = namedResources; } public V1alpha2ResourceRequest vendorParameters(Object vendorParameters) { - this.vendorParameters = vendorParameters; return this; } @@ -99,7 +96,6 @@ public Object getVendorParameters() { return vendorParameters; } - public void setVendorParameters(Object vendorParameters) { this.vendorParameters = vendorParameters; } @@ -160,28 +156,29 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha2ResourceRequest + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha2ResourceRequest */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha2ResourceRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha2ResourceRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha2ResourceRequest is not found in the empty JSON string", V1alpha2ResourceRequest.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha2ResourceRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha2ResourceRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha2ResourceRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `namedResources` if (jsonObj.get("namedResources") != null && !jsonObj.get("namedResources").isJsonNull()) { - V1alpha2NamedResourcesRequest.validateJsonObject(jsonObj.getAsJsonObject("namedResources")); + V1alpha2NamedResourcesRequest.validateJsonElement(jsonObj.get("namedResources")); } } @@ -205,9 +202,9 @@ public void write(JsonWriter out, V1alpha2ResourceRequest value) throws IOExcept @Override public V1alpha2ResourceRequest read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -234,3 +231,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceSlice.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceSlice.java index c98802016f..8dc77dc1e1 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceSlice.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceSlice.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1ObjectMeta; import io.kubernetes.client.openapi.models.V1alpha2NamedResourcesResources; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -43,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -51,7 +51,7 @@ /** * ResourceSlice provides information about available resources on individual nodes. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha2ResourceSlice implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -81,7 +81,6 @@ public V1alpha2ResourceSlice() { } public V1alpha2ResourceSlice apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -95,14 +94,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1alpha2ResourceSlice driverName(String driverName) { - this.driverName = driverName; return this; } @@ -116,14 +113,12 @@ public String getDriverName() { return driverName; } - public void setDriverName(String driverName) { this.driverName = driverName; } public V1alpha2ResourceSlice kind(String kind) { - this.kind = kind; return this; } @@ -137,14 +132,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1alpha2ResourceSlice metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -158,14 +151,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V1alpha2ResourceSlice namedResources(V1alpha2NamedResourcesResources namedResources) { - this.namedResources = namedResources; return this; } @@ -179,14 +170,12 @@ public V1alpha2NamedResourcesResources getNamedResources() { return namedResources; } - public void setNamedResources(V1alpha2NamedResourcesResources namedResources) { this.namedResources = namedResources; } public V1alpha2ResourceSlice nodeName(String nodeName) { - this.nodeName = nodeName; return this; } @@ -200,7 +189,6 @@ public String getNodeName() { return nodeName; } - public void setNodeName(String nodeName) { this.nodeName = nodeName; } @@ -274,32 +262,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha2ResourceSlice + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha2ResourceSlice */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha2ResourceSlice.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha2ResourceSlice.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha2ResourceSlice is not found in the empty JSON string", V1alpha2ResourceSlice.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha2ResourceSlice.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha2ResourceSlice` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha2ResourceSlice` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1alpha2ResourceSlice.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -311,11 +300,11 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } // validate the optional field `namedResources` if (jsonObj.get("namedResources") != null && !jsonObj.get("namedResources").isJsonNull()) { - V1alpha2NamedResourcesResources.validateJsonObject(jsonObj.getAsJsonObject("namedResources")); + V1alpha2NamedResourcesResources.validateJsonElement(jsonObj.get("namedResources")); } if ((jsonObj.get("nodeName") != null && !jsonObj.get("nodeName").isJsonNull()) && !jsonObj.get("nodeName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `nodeName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nodeName").toString())); @@ -342,9 +331,9 @@ public void write(JsonWriter out, V1alpha2ResourceSlice value) throws IOExceptio @Override public V1alpha2ResourceSlice read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -371,3 +360,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceSliceList.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceSliceList.java index 08c0d927d7..f6496ca09b 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceSliceList.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceSliceList.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1alpha2ResourceSlice; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * ResourceSliceList is a collection of ResourceSlices. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha2ResourceSliceList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -75,7 +75,6 @@ public V1alpha2ResourceSliceList() { } public V1alpha2ResourceSliceList apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -89,14 +88,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1alpha2ResourceSliceList items(List items) { - this.items = items; return this; } @@ -118,14 +115,12 @@ public List getItems() { return items; } - public void setItems(List items) { this.items = items; } public V1alpha2ResourceSliceList kind(String kind) { - this.kind = kind; return this; } @@ -139,14 +134,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1alpha2ResourceSliceList metadata(V1ListMeta metadata) { - this.metadata = metadata; return this; } @@ -160,7 +153,6 @@ public V1ListMeta getMetadata() { return metadata; } - public void setMetadata(V1ListMeta metadata) { this.metadata = metadata; } @@ -228,32 +220,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha2ResourceSliceList + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha2ResourceSliceList */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha2ResourceSliceList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha2ResourceSliceList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha2ResourceSliceList is not found in the empty JSON string", V1alpha2ResourceSliceList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha2ResourceSliceList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha2ResourceSliceList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha2ResourceSliceList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1alpha2ResourceSliceList.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -265,14 +258,14 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); // validate the required field `items` (array) for (int i = 0; i < jsonArrayitems.size(); i++) { - V1alpha2ResourceSlice.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject()); + V1alpha2ResourceSlice.validateJsonElement(jsonArrayitems.get(i)); }; if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ListMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ListMeta.validateJsonElement(jsonObj.get("metadata")); } } @@ -296,9 +289,9 @@ public void write(JsonWriter out, V1alpha2ResourceSliceList value) throws IOExce @Override public V1alpha2ResourceSliceList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -325,3 +318,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2StructuredResourceHandle.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2StructuredResourceHandle.java index 5697b8cbd2..c89201d821 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2StructuredResourceHandle.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2StructuredResourceHandle.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1alpha2DriverAllocationResult; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * StructuredResourceHandle is the in-tree representation of the allocation result. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha2StructuredResourceHandle { public static final String SERIALIZED_NAME_NODE_NAME = "nodeName"; @SerializedName(SERIALIZED_NAME_NODE_NAME) @@ -74,7 +74,6 @@ public V1alpha2StructuredResourceHandle() { } public V1alpha2StructuredResourceHandle nodeName(String nodeName) { - this.nodeName = nodeName; return this; } @@ -88,14 +87,12 @@ public String getNodeName() { return nodeName; } - public void setNodeName(String nodeName) { this.nodeName = nodeName; } public V1alpha2StructuredResourceHandle results(List results) { - this.results = results; return this; } @@ -117,14 +114,12 @@ public List getResults() { return results; } - public void setResults(List results) { this.results = results; } public V1alpha2StructuredResourceHandle vendorClaimParameters(Object vendorClaimParameters) { - this.vendorClaimParameters = vendorClaimParameters; return this; } @@ -138,14 +133,12 @@ public Object getVendorClaimParameters() { return vendorClaimParameters; } - public void setVendorClaimParameters(Object vendorClaimParameters) { this.vendorClaimParameters = vendorClaimParameters; } public V1alpha2StructuredResourceHandle vendorClassParameters(Object vendorClassParameters) { - this.vendorClassParameters = vendorClassParameters; return this; } @@ -159,7 +152,6 @@ public Object getVendorClassParameters() { return vendorClassParameters; } - public void setVendorClassParameters(Object vendorClassParameters) { this.vendorClassParameters = vendorClassParameters; } @@ -227,32 +219,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha2StructuredResourceHandle + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha2StructuredResourceHandle */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha2StructuredResourceHandle.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha2StructuredResourceHandle.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha2StructuredResourceHandle is not found in the empty JSON string", V1alpha2StructuredResourceHandle.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha2StructuredResourceHandle.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha2StructuredResourceHandle` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha2StructuredResourceHandle` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1alpha2StructuredResourceHandle.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("nodeName") != null && !jsonObj.get("nodeName").isJsonNull()) && !jsonObj.get("nodeName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `nodeName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nodeName").toString())); } @@ -264,7 +257,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArrayresults = jsonObj.getAsJsonArray("results"); // validate the required field `results` (array) for (int i = 0; i < jsonArrayresults.size(); i++) { - V1alpha2DriverAllocationResult.validateJsonObject(jsonArrayresults.get(i).getAsJsonObject()); + V1alpha2DriverAllocationResult.validateJsonElement(jsonArrayresults.get(i)); }; } @@ -288,9 +281,9 @@ public void write(JsonWriter out, V1alpha2StructuredResourceHandle value) throws @Override public V1alpha2StructuredResourceHandle read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -317,3 +310,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2VendorParameters.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2VendorParameters.java index 850a87808b..41797fb8e3 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2VendorParameters.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha2VendorParameters.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * VendorParameters are opaque parameters for one particular driver. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1alpha2VendorParameters { public static final String SERIALIZED_NAME_DRIVER_NAME = "driverName"; @SerializedName(SERIALIZED_NAME_DRIVER_NAME) @@ -63,7 +63,6 @@ public V1alpha2VendorParameters() { } public V1alpha2VendorParameters driverName(String driverName) { - this.driverName = driverName; return this; } @@ -77,14 +76,12 @@ public String getDriverName() { return driverName; } - public void setDriverName(String driverName) { this.driverName = driverName; } public V1alpha2VendorParameters parameters(Object parameters) { - this.parameters = parameters; return this; } @@ -98,7 +95,6 @@ public Object getParameters() { return parameters; } - public void setParameters(Object parameters) { this.parameters = parameters; } @@ -159,25 +155,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1alpha2VendorParameters + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1alpha2VendorParameters */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1alpha2VendorParameters.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1alpha2VendorParameters.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1alpha2VendorParameters is not found in the empty JSON string", V1alpha2VendorParameters.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1alpha2VendorParameters.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha2VendorParameters` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1alpha2VendorParameters` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("driverName") != null && !jsonObj.get("driverName").isJsonNull()) && !jsonObj.get("driverName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `driverName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("driverName").toString())); } @@ -203,9 +200,9 @@ public void write(JsonWriter out, V1alpha2VendorParameters value) throws IOExcep @Override public V1alpha2VendorParameters read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -232,3 +229,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1AuditAnnotation.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1AuditAnnotation.java index 7dde4497ff..6874fa1c09 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1AuditAnnotation.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1AuditAnnotation.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * AuditAnnotation describes how to produce an audit annotation for an API request. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1beta1AuditAnnotation { public static final String SERIALIZED_NAME_KEY = "key"; @SerializedName(SERIALIZED_NAME_KEY) @@ -63,7 +63,6 @@ public V1beta1AuditAnnotation() { } public V1beta1AuditAnnotation key(String key) { - this.key = key; return this; } @@ -77,14 +76,12 @@ public String getKey() { return key; } - public void setKey(String key) { this.key = key; } public V1beta1AuditAnnotation valueExpression(String valueExpression) { - this.valueExpression = valueExpression; return this; } @@ -98,7 +95,6 @@ public String getValueExpression() { return valueExpression; } - public void setValueExpression(String valueExpression) { this.valueExpression = valueExpression; } @@ -161,32 +157,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1beta1AuditAnnotation + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1beta1AuditAnnotation */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1beta1AuditAnnotation.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1beta1AuditAnnotation.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1beta1AuditAnnotation is not found in the empty JSON string", V1beta1AuditAnnotation.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1beta1AuditAnnotation.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta1AuditAnnotation` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta1AuditAnnotation` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1beta1AuditAnnotation.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("key").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `key` to be a primitive type in the JSON string but got `%s`", jsonObj.get("key").toString())); } @@ -215,9 +212,9 @@ public void write(JsonWriter out, V1beta1AuditAnnotation value) throws IOExcepti @Override public V1beta1AuditAnnotation read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -244,3 +241,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1ExpressionWarning.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1ExpressionWarning.java index cec14f592d..bec352df9c 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1ExpressionWarning.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1ExpressionWarning.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * ExpressionWarning is a warning information that targets a specific expression. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1beta1ExpressionWarning { public static final String SERIALIZED_NAME_FIELD_REF = "fieldRef"; @SerializedName(SERIALIZED_NAME_FIELD_REF) @@ -63,7 +63,6 @@ public V1beta1ExpressionWarning() { } public V1beta1ExpressionWarning fieldRef(String fieldRef) { - this.fieldRef = fieldRef; return this; } @@ -77,14 +76,12 @@ public String getFieldRef() { return fieldRef; } - public void setFieldRef(String fieldRef) { this.fieldRef = fieldRef; } public V1beta1ExpressionWarning warning(String warning) { - this.warning = warning; return this; } @@ -98,7 +95,6 @@ public String getWarning() { return warning; } - public void setWarning(String warning) { this.warning = warning; } @@ -161,32 +157,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1beta1ExpressionWarning + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1beta1ExpressionWarning */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1beta1ExpressionWarning.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1beta1ExpressionWarning.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1beta1ExpressionWarning is not found in the empty JSON string", V1beta1ExpressionWarning.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1beta1ExpressionWarning.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta1ExpressionWarning` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta1ExpressionWarning` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1beta1ExpressionWarning.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("fieldRef").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `fieldRef` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fieldRef").toString())); } @@ -215,9 +212,9 @@ public void write(JsonWriter out, V1beta1ExpressionWarning value) throws IOExcep @Override public V1beta1ExpressionWarning read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -244,3 +241,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1MatchCondition.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1MatchCondition.java index 930f862de4..ade0832de4 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1MatchCondition.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1MatchCondition.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * MatchCondition represents a condition which must be fulfilled for a request to be sent to a webhook. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1beta1MatchCondition { public static final String SERIALIZED_NAME_EXPRESSION = "expression"; @SerializedName(SERIALIZED_NAME_EXPRESSION) @@ -63,7 +63,6 @@ public V1beta1MatchCondition() { } public V1beta1MatchCondition expression(String expression) { - this.expression = expression; return this; } @@ -77,14 +76,12 @@ public String getExpression() { return expression; } - public void setExpression(String expression) { this.expression = expression; } public V1beta1MatchCondition name(String name) { - this.name = name; return this; } @@ -98,7 +95,6 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } @@ -161,32 +157,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1beta1MatchCondition + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1beta1MatchCondition */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1beta1MatchCondition.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1beta1MatchCondition.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1beta1MatchCondition is not found in the empty JSON string", V1beta1MatchCondition.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1beta1MatchCondition.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta1MatchCondition` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta1MatchCondition` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1beta1MatchCondition.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("expression").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `expression` to be a primitive type in the JSON string but got `%s`", jsonObj.get("expression").toString())); } @@ -215,9 +212,9 @@ public void write(JsonWriter out, V1beta1MatchCondition value) throws IOExceptio @Override public V1beta1MatchCondition read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -244,3 +241,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1MatchResources.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1MatchResources.java index 20e7df409f..d34a6dbbf1 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1MatchResources.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1MatchResources.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1beta1NamedRuleWithOperations; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,11 +53,11 @@ /** * MatchResources decides whether to run the admission control policy on an object based on whether it meets the match criteria. The exclude rules take precedence over include rules (if a resource matches both, it is excluded) */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1beta1MatchResources { public static final String SERIALIZED_NAME_EXCLUDE_RESOURCE_RULES = "excludeResourceRules"; @SerializedName(SERIALIZED_NAME_EXCLUDE_RESOURCE_RULES) - private List excludeResourceRules; + private List excludeResourceRules = new ArrayList<>(); public static final String SERIALIZED_NAME_MATCH_POLICY = "matchPolicy"; @SerializedName(SERIALIZED_NAME_MATCH_POLICY) @@ -73,13 +73,12 @@ public class V1beta1MatchResources { public static final String SERIALIZED_NAME_RESOURCE_RULES = "resourceRules"; @SerializedName(SERIALIZED_NAME_RESOURCE_RULES) - private List resourceRules; + private List resourceRules = new ArrayList<>(); public V1beta1MatchResources() { } public V1beta1MatchResources excludeResourceRules(List excludeResourceRules) { - this.excludeResourceRules = excludeResourceRules; return this; } @@ -101,14 +100,12 @@ public List getExcludeResourceRules() { return excludeResourceRules; } - public void setExcludeResourceRules(List excludeResourceRules) { this.excludeResourceRules = excludeResourceRules; } public V1beta1MatchResources matchPolicy(String matchPolicy) { - this.matchPolicy = matchPolicy; return this; } @@ -122,14 +119,12 @@ public String getMatchPolicy() { return matchPolicy; } - public void setMatchPolicy(String matchPolicy) { this.matchPolicy = matchPolicy; } public V1beta1MatchResources namespaceSelector(V1LabelSelector namespaceSelector) { - this.namespaceSelector = namespaceSelector; return this; } @@ -143,14 +138,12 @@ public V1LabelSelector getNamespaceSelector() { return namespaceSelector; } - public void setNamespaceSelector(V1LabelSelector namespaceSelector) { this.namespaceSelector = namespaceSelector; } public V1beta1MatchResources objectSelector(V1LabelSelector objectSelector) { - this.objectSelector = objectSelector; return this; } @@ -164,14 +157,12 @@ public V1LabelSelector getObjectSelector() { return objectSelector; } - public void setObjectSelector(V1LabelSelector objectSelector) { this.objectSelector = objectSelector; } public V1beta1MatchResources resourceRules(List resourceRules) { - this.resourceRules = resourceRules; return this; } @@ -193,7 +184,6 @@ public List getResourceRules() { return resourceRules; } - public void setResourceRules(List resourceRules) { this.resourceRules = resourceRules; } @@ -263,25 +253,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1beta1MatchResources + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1beta1MatchResources */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1beta1MatchResources.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1beta1MatchResources.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1beta1MatchResources is not found in the empty JSON string", V1beta1MatchResources.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1beta1MatchResources.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta1MatchResources` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta1MatchResources` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (jsonObj.get("excludeResourceRules") != null && !jsonObj.get("excludeResourceRules").isJsonNull()) { JsonArray jsonArrayexcludeResourceRules = jsonObj.getAsJsonArray("excludeResourceRules"); if (jsonArrayexcludeResourceRules != null) { @@ -292,7 +283,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `excludeResourceRules` (array) for (int i = 0; i < jsonArrayexcludeResourceRules.size(); i++) { - V1beta1NamedRuleWithOperations.validateJsonObject(jsonArrayexcludeResourceRules.get(i).getAsJsonObject()); + V1beta1NamedRuleWithOperations.validateJsonElement(jsonArrayexcludeResourceRules.get(i)); }; } } @@ -301,11 +292,11 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `namespaceSelector` if (jsonObj.get("namespaceSelector") != null && !jsonObj.get("namespaceSelector").isJsonNull()) { - V1LabelSelector.validateJsonObject(jsonObj.getAsJsonObject("namespaceSelector")); + V1LabelSelector.validateJsonElement(jsonObj.get("namespaceSelector")); } // validate the optional field `objectSelector` if (jsonObj.get("objectSelector") != null && !jsonObj.get("objectSelector").isJsonNull()) { - V1LabelSelector.validateJsonObject(jsonObj.getAsJsonObject("objectSelector")); + V1LabelSelector.validateJsonElement(jsonObj.get("objectSelector")); } if (jsonObj.get("resourceRules") != null && !jsonObj.get("resourceRules").isJsonNull()) { JsonArray jsonArrayresourceRules = jsonObj.getAsJsonArray("resourceRules"); @@ -317,7 +308,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `resourceRules` (array) for (int i = 0; i < jsonArrayresourceRules.size(); i++) { - V1beta1NamedRuleWithOperations.validateJsonObject(jsonArrayresourceRules.get(i).getAsJsonObject()); + V1beta1NamedRuleWithOperations.validateJsonElement(jsonArrayresourceRules.get(i)); }; } } @@ -343,9 +334,9 @@ public void write(JsonWriter out, V1beta1MatchResources value) throws IOExceptio @Override public V1beta1MatchResources read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -372,3 +363,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1NamedRuleWithOperations.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1NamedRuleWithOperations.java index f5bef9db9c..0f8a852807 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1NamedRuleWithOperations.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1NamedRuleWithOperations.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -43,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -51,27 +51,27 @@ /** * NamedRuleWithOperations is a tuple of Operations and Resources with ResourceNames. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1beta1NamedRuleWithOperations { public static final String SERIALIZED_NAME_API_GROUPS = "apiGroups"; @SerializedName(SERIALIZED_NAME_API_GROUPS) - private List apiGroups; + private List apiGroups = new ArrayList<>(); public static final String SERIALIZED_NAME_API_VERSIONS = "apiVersions"; @SerializedName(SERIALIZED_NAME_API_VERSIONS) - private List apiVersions; + private List apiVersions = new ArrayList<>(); public static final String SERIALIZED_NAME_OPERATIONS = "operations"; @SerializedName(SERIALIZED_NAME_OPERATIONS) - private List operations; + private List operations = new ArrayList<>(); public static final String SERIALIZED_NAME_RESOURCE_NAMES = "resourceNames"; @SerializedName(SERIALIZED_NAME_RESOURCE_NAMES) - private List resourceNames; + private List resourceNames = new ArrayList<>(); public static final String SERIALIZED_NAME_RESOURCES = "resources"; @SerializedName(SERIALIZED_NAME_RESOURCES) - private List resources; + private List resources = new ArrayList<>(); public static final String SERIALIZED_NAME_SCOPE = "scope"; @SerializedName(SERIALIZED_NAME_SCOPE) @@ -81,7 +81,6 @@ public V1beta1NamedRuleWithOperations() { } public V1beta1NamedRuleWithOperations apiGroups(List apiGroups) { - this.apiGroups = apiGroups; return this; } @@ -103,14 +102,12 @@ public List getApiGroups() { return apiGroups; } - public void setApiGroups(List apiGroups) { this.apiGroups = apiGroups; } public V1beta1NamedRuleWithOperations apiVersions(List apiVersions) { - this.apiVersions = apiVersions; return this; } @@ -132,14 +129,12 @@ public List getApiVersions() { return apiVersions; } - public void setApiVersions(List apiVersions) { this.apiVersions = apiVersions; } public V1beta1NamedRuleWithOperations operations(List operations) { - this.operations = operations; return this; } @@ -161,14 +156,12 @@ public List getOperations() { return operations; } - public void setOperations(List operations) { this.operations = operations; } public V1beta1NamedRuleWithOperations resourceNames(List resourceNames) { - this.resourceNames = resourceNames; return this; } @@ -190,14 +183,12 @@ public List getResourceNames() { return resourceNames; } - public void setResourceNames(List resourceNames) { this.resourceNames = resourceNames; } public V1beta1NamedRuleWithOperations resources(List resources) { - this.resources = resources; return this; } @@ -219,14 +210,12 @@ public List getResources() { return resources; } - public void setResources(List resources) { this.resources = resources; } public V1beta1NamedRuleWithOperations scope(String scope) { - this.scope = scope; return this; } @@ -240,7 +229,6 @@ public String getScope() { return scope; } - public void setScope(String scope) { this.scope = scope; } @@ -313,43 +301,44 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1beta1NamedRuleWithOperations + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1beta1NamedRuleWithOperations */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1beta1NamedRuleWithOperations.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1beta1NamedRuleWithOperations.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1beta1NamedRuleWithOperations is not found in the empty JSON string", V1beta1NamedRuleWithOperations.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1beta1NamedRuleWithOperations.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta1NamedRuleWithOperations` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta1NamedRuleWithOperations` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the optional json data is an array if present - if (jsonObj.get("apiGroups") != null && !jsonObj.get("apiGroups").isJsonArray()) { + if (jsonObj.get("apiGroups") != null && !jsonObj.get("apiGroups").isJsonNull() && !jsonObj.get("apiGroups").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `apiGroups` to be an array in the JSON string but got `%s`", jsonObj.get("apiGroups").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("apiVersions") != null && !jsonObj.get("apiVersions").isJsonArray()) { + if (jsonObj.get("apiVersions") != null && !jsonObj.get("apiVersions").isJsonNull() && !jsonObj.get("apiVersions").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersions` to be an array in the JSON string but got `%s`", jsonObj.get("apiVersions").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("operations") != null && !jsonObj.get("operations").isJsonArray()) { + if (jsonObj.get("operations") != null && !jsonObj.get("operations").isJsonNull() && !jsonObj.get("operations").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `operations` to be an array in the JSON string but got `%s`", jsonObj.get("operations").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("resourceNames") != null && !jsonObj.get("resourceNames").isJsonArray()) { + if (jsonObj.get("resourceNames") != null && !jsonObj.get("resourceNames").isJsonNull() && !jsonObj.get("resourceNames").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `resourceNames` to be an array in the JSON string but got `%s`", jsonObj.get("resourceNames").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("resources") != null && !jsonObj.get("resources").isJsonArray()) { + if (jsonObj.get("resources") != null && !jsonObj.get("resources").isJsonNull() && !jsonObj.get("resources").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `resources` to be an array in the JSON string but got `%s`", jsonObj.get("resources").toString())); } if ((jsonObj.get("scope") != null && !jsonObj.get("scope").isJsonNull()) && !jsonObj.get("scope").isJsonPrimitive()) { @@ -377,9 +366,9 @@ public void write(JsonWriter out, V1beta1NamedRuleWithOperations value) throws I @Override public V1beta1NamedRuleWithOperations read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -406,3 +395,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1ParamKind.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1ParamKind.java index 7c60b4da63..2f2d61fe43 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1ParamKind.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1ParamKind.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * ParamKind is a tuple of Group Kind and Version. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1beta1ParamKind { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -63,7 +63,6 @@ public V1beta1ParamKind() { } public V1beta1ParamKind apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -77,14 +76,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1beta1ParamKind kind(String kind) { - this.kind = kind; return this; } @@ -98,7 +95,6 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } @@ -159,25 +155,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1beta1ParamKind + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1beta1ParamKind */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1beta1ParamKind.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1beta1ParamKind.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1beta1ParamKind is not found in the empty JSON string", V1beta1ParamKind.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1beta1ParamKind.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta1ParamKind` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta1ParamKind` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -206,9 +203,9 @@ public void write(JsonWriter out, V1beta1ParamKind value) throws IOException { @Override public V1beta1ParamKind read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -235,3 +232,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1ParamRef.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1ParamRef.java index 61ca979dbc..38ef115a49 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1ParamRef.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1ParamRef.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.openapi.models.V1LabelSelector; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * ParamRef describes how to locate the params to be used as input to expressions of rules applied by a policy binding. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1beta1ParamRef { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) @@ -72,7 +72,6 @@ public V1beta1ParamRef() { } public V1beta1ParamRef name(String name) { - this.name = name; return this; } @@ -86,14 +85,12 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } public V1beta1ParamRef namespace(String namespace) { - this.namespace = namespace; return this; } @@ -107,14 +104,12 @@ public String getNamespace() { return namespace; } - public void setNamespace(String namespace) { this.namespace = namespace; } public V1beta1ParamRef parameterNotFoundAction(String parameterNotFoundAction) { - this.parameterNotFoundAction = parameterNotFoundAction; return this; } @@ -128,14 +123,12 @@ public String getParameterNotFoundAction() { return parameterNotFoundAction; } - public void setParameterNotFoundAction(String parameterNotFoundAction) { this.parameterNotFoundAction = parameterNotFoundAction; } public V1beta1ParamRef selector(V1LabelSelector selector) { - this.selector = selector; return this; } @@ -149,7 +142,6 @@ public V1LabelSelector getSelector() { return selector; } - public void setSelector(V1LabelSelector selector) { this.selector = selector; } @@ -216,25 +208,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1beta1ParamRef + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1beta1ParamRef */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1beta1ParamRef.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1beta1ParamRef.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1beta1ParamRef is not found in the empty JSON string", V1beta1ParamRef.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1beta1ParamRef.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta1ParamRef` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta1ParamRef` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } @@ -246,7 +239,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `selector` if (jsonObj.get("selector") != null && !jsonObj.get("selector").isJsonNull()) { - V1LabelSelector.validateJsonObject(jsonObj.getAsJsonObject("selector")); + V1LabelSelector.validateJsonElement(jsonObj.get("selector")); } } @@ -270,9 +263,9 @@ public void write(JsonWriter out, V1beta1ParamRef value) throws IOException { @Override public V1beta1ParamRef read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -299,3 +292,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1SelfSubjectReview.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1SelfSubjectReview.java index 54fdfeb74e..3a2b15d6a0 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1SelfSubjectReview.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1SelfSubjectReview.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1ObjectMeta; import io.kubernetes.client.openapi.models.V1beta1SelfSubjectReviewStatus; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -43,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -51,7 +51,7 @@ /** * SelfSubjectReview contains the user information that the kube-apiserver has about the user making this request. When using impersonation, users will receive the user info of the user being impersonated. If impersonation or request header authentication is used, any extra keys will have their case ignored and returned as lowercase. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1beta1SelfSubjectReview implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -73,7 +73,6 @@ public V1beta1SelfSubjectReview() { } public V1beta1SelfSubjectReview apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -87,14 +86,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1beta1SelfSubjectReview kind(String kind) { - this.kind = kind; return this; } @@ -108,14 +105,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1beta1SelfSubjectReview metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -129,14 +124,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V1beta1SelfSubjectReview status(V1beta1SelfSubjectReviewStatus status) { - this.status = status; return this; } @@ -150,7 +143,6 @@ public V1beta1SelfSubjectReviewStatus getStatus() { return status; } - public void setStatus(V1beta1SelfSubjectReviewStatus status) { this.status = status; } @@ -217,25 +209,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1beta1SelfSubjectReview + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1beta1SelfSubjectReview */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1beta1SelfSubjectReview.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1beta1SelfSubjectReview.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1beta1SelfSubjectReview is not found in the empty JSON string", V1beta1SelfSubjectReview.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1beta1SelfSubjectReview.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta1SelfSubjectReview` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta1SelfSubjectReview` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -244,11 +237,11 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } // validate the optional field `status` if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { - V1beta1SelfSubjectReviewStatus.validateJsonObject(jsonObj.getAsJsonObject("status")); + V1beta1SelfSubjectReviewStatus.validateJsonElement(jsonObj.get("status")); } } @@ -272,9 +265,9 @@ public void write(JsonWriter out, V1beta1SelfSubjectReview value) throws IOExcep @Override public V1beta1SelfSubjectReview read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -301,3 +294,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1SelfSubjectReviewStatus.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1SelfSubjectReviewStatus.java index 4ffef4d95d..fd9d9a87a5 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1SelfSubjectReviewStatus.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1SelfSubjectReviewStatus.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.openapi.models.V1UserInfo; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * SelfSubjectReviewStatus is filled by the kube-apiserver and sent back to a user. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1beta1SelfSubjectReviewStatus { public static final String SERIALIZED_NAME_USER_INFO = "userInfo"; @SerializedName(SERIALIZED_NAME_USER_INFO) @@ -60,7 +60,6 @@ public V1beta1SelfSubjectReviewStatus() { } public V1beta1SelfSubjectReviewStatus userInfo(V1UserInfo userInfo) { - this.userInfo = userInfo; return this; } @@ -74,7 +73,6 @@ public V1UserInfo getUserInfo() { return userInfo; } - public void setUserInfo(V1UserInfo userInfo) { this.userInfo = userInfo; } @@ -132,28 +130,29 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1beta1SelfSubjectReviewStatus + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1beta1SelfSubjectReviewStatus */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1beta1SelfSubjectReviewStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1beta1SelfSubjectReviewStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1beta1SelfSubjectReviewStatus is not found in the empty JSON string", V1beta1SelfSubjectReviewStatus.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1beta1SelfSubjectReviewStatus.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta1SelfSubjectReviewStatus` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta1SelfSubjectReviewStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `userInfo` if (jsonObj.get("userInfo") != null && !jsonObj.get("userInfo").isJsonNull()) { - V1UserInfo.validateJsonObject(jsonObj.getAsJsonObject("userInfo")); + V1UserInfo.validateJsonElement(jsonObj.get("userInfo")); } } @@ -177,9 +176,9 @@ public void write(JsonWriter out, V1beta1SelfSubjectReviewStatus value) throws I @Override public V1beta1SelfSubjectReviewStatus read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -206,3 +205,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1TypeChecking.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1TypeChecking.java index b541e8cfc3..625c6fdb4b 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1TypeChecking.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1TypeChecking.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1beta1ExpressionWarning; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,17 +52,16 @@ /** * TypeChecking contains results of type checking the expressions in the ValidatingAdmissionPolicy */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1beta1TypeChecking { public static final String SERIALIZED_NAME_EXPRESSION_WARNINGS = "expressionWarnings"; @SerializedName(SERIALIZED_NAME_EXPRESSION_WARNINGS) - private List expressionWarnings; + private List expressionWarnings = new ArrayList<>(); public V1beta1TypeChecking() { } public V1beta1TypeChecking expressionWarnings(List expressionWarnings) { - this.expressionWarnings = expressionWarnings; return this; } @@ -84,7 +83,6 @@ public List getExpressionWarnings() { return expressionWarnings; } - public void setExpressionWarnings(List expressionWarnings) { this.expressionWarnings = expressionWarnings; } @@ -142,25 +140,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1beta1TypeChecking + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1beta1TypeChecking */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1beta1TypeChecking.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1beta1TypeChecking.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1beta1TypeChecking is not found in the empty JSON string", V1beta1TypeChecking.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1beta1TypeChecking.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta1TypeChecking` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta1TypeChecking` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (jsonObj.get("expressionWarnings") != null && !jsonObj.get("expressionWarnings").isJsonNull()) { JsonArray jsonArrayexpressionWarnings = jsonObj.getAsJsonArray("expressionWarnings"); if (jsonArrayexpressionWarnings != null) { @@ -171,7 +170,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `expressionWarnings` (array) for (int i = 0; i < jsonArrayexpressionWarnings.size(); i++) { - V1beta1ExpressionWarning.validateJsonObject(jsonArrayexpressionWarnings.get(i).getAsJsonObject()); + V1beta1ExpressionWarning.validateJsonElement(jsonArrayexpressionWarnings.get(i)); }; } } @@ -197,9 +196,9 @@ public void write(JsonWriter out, V1beta1TypeChecking value) throws IOException @Override public V1beta1TypeChecking read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -226,3 +225,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicy.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicy.java index 88d148262e..12718f0f38 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicy.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicy.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1beta1ValidatingAdmissionPolicySpec; import io.kubernetes.client.openapi.models.V1beta1ValidatingAdmissionPolicyStatus; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * ValidatingAdmissionPolicy describes the definition of an admission validation policy that accepts or rejects an object without changing it. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1beta1ValidatingAdmissionPolicy implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -78,7 +78,6 @@ public V1beta1ValidatingAdmissionPolicy() { } public V1beta1ValidatingAdmissionPolicy apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -92,14 +91,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1beta1ValidatingAdmissionPolicy kind(String kind) { - this.kind = kind; return this; } @@ -113,14 +110,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1beta1ValidatingAdmissionPolicy metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -134,14 +129,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V1beta1ValidatingAdmissionPolicy spec(V1beta1ValidatingAdmissionPolicySpec spec) { - this.spec = spec; return this; } @@ -155,14 +148,12 @@ public V1beta1ValidatingAdmissionPolicySpec getSpec() { return spec; } - public void setSpec(V1beta1ValidatingAdmissionPolicySpec spec) { this.spec = spec; } public V1beta1ValidatingAdmissionPolicy status(V1beta1ValidatingAdmissionPolicyStatus status) { - this.status = status; return this; } @@ -176,7 +167,6 @@ public V1beta1ValidatingAdmissionPolicyStatus getStatus() { return status; } - public void setStatus(V1beta1ValidatingAdmissionPolicyStatus status) { this.status = status; } @@ -246,25 +236,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1beta1ValidatingAdmissionPolicy + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1beta1ValidatingAdmissionPolicy */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1beta1ValidatingAdmissionPolicy.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1beta1ValidatingAdmissionPolicy.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1beta1ValidatingAdmissionPolicy is not found in the empty JSON string", V1beta1ValidatingAdmissionPolicy.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1beta1ValidatingAdmissionPolicy.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta1ValidatingAdmissionPolicy` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta1ValidatingAdmissionPolicy` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -273,15 +264,15 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } // validate the optional field `spec` if (jsonObj.get("spec") != null && !jsonObj.get("spec").isJsonNull()) { - V1beta1ValidatingAdmissionPolicySpec.validateJsonObject(jsonObj.getAsJsonObject("spec")); + V1beta1ValidatingAdmissionPolicySpec.validateJsonElement(jsonObj.get("spec")); } // validate the optional field `status` if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { - V1beta1ValidatingAdmissionPolicyStatus.validateJsonObject(jsonObj.getAsJsonObject("status")); + V1beta1ValidatingAdmissionPolicyStatus.validateJsonElement(jsonObj.get("status")); } } @@ -305,9 +296,9 @@ public void write(JsonWriter out, V1beta1ValidatingAdmissionPolicy value) throws @Override public V1beta1ValidatingAdmissionPolicy read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -334,3 +325,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicyBinding.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicyBinding.java index 11e7549151..2f36bd4f1e 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicyBinding.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicyBinding.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1ObjectMeta; import io.kubernetes.client.openapi.models.V1beta1ValidatingAdmissionPolicyBindingSpec; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -43,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -51,7 +51,7 @@ /** * ValidatingAdmissionPolicyBinding binds the ValidatingAdmissionPolicy with paramerized resources. ValidatingAdmissionPolicyBinding and parameter CRDs together define how cluster administrators configure policies for clusters. For a given admission request, each binding will cause its policy to be evaluated N times, where N is 1 for policies/bindings that don't use params, otherwise N is the number of parameters selected by the binding. The CEL expressions of a policy must have a computed CEL cost below the maximum CEL budget. Each evaluation of the policy is given an independent CEL cost budget. Adding/removing policies, bindings, or params can not affect whether a given (policy, binding, param) combination is within its own CEL budget. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1beta1ValidatingAdmissionPolicyBinding implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -73,7 +73,6 @@ public V1beta1ValidatingAdmissionPolicyBinding() { } public V1beta1ValidatingAdmissionPolicyBinding apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -87,14 +86,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1beta1ValidatingAdmissionPolicyBinding kind(String kind) { - this.kind = kind; return this; } @@ -108,14 +105,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1beta1ValidatingAdmissionPolicyBinding metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -129,14 +124,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V1beta1ValidatingAdmissionPolicyBinding spec(V1beta1ValidatingAdmissionPolicyBindingSpec spec) { - this.spec = spec; return this; } @@ -150,7 +143,6 @@ public V1beta1ValidatingAdmissionPolicyBindingSpec getSpec() { return spec; } - public void setSpec(V1beta1ValidatingAdmissionPolicyBindingSpec spec) { this.spec = spec; } @@ -217,25 +209,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1beta1ValidatingAdmissionPolicyBinding + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1beta1ValidatingAdmissionPolicyBinding */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1beta1ValidatingAdmissionPolicyBinding.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1beta1ValidatingAdmissionPolicyBinding.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1beta1ValidatingAdmissionPolicyBinding is not found in the empty JSON string", V1beta1ValidatingAdmissionPolicyBinding.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1beta1ValidatingAdmissionPolicyBinding.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta1ValidatingAdmissionPolicyBinding` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta1ValidatingAdmissionPolicyBinding` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -244,11 +237,11 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } // validate the optional field `spec` if (jsonObj.get("spec") != null && !jsonObj.get("spec").isJsonNull()) { - V1beta1ValidatingAdmissionPolicyBindingSpec.validateJsonObject(jsonObj.getAsJsonObject("spec")); + V1beta1ValidatingAdmissionPolicyBindingSpec.validateJsonElement(jsonObj.get("spec")); } } @@ -272,9 +265,9 @@ public void write(JsonWriter out, V1beta1ValidatingAdmissionPolicyBinding value) @Override public V1beta1ValidatingAdmissionPolicyBinding read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -301,3 +294,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicyBindingList.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicyBindingList.java index c70728e2d3..4d3d081a20 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicyBindingList.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicyBindingList.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1beta1ValidatingAdmissionPolicyBinding; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * ValidatingAdmissionPolicyBindingList is a list of ValidatingAdmissionPolicyBinding. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1beta1ValidatingAdmissionPolicyBindingList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -61,7 +61,7 @@ public class V1beta1ValidatingAdmissionPolicyBindingList implements io.kubernete public static final String SERIALIZED_NAME_ITEMS = "items"; @SerializedName(SERIALIZED_NAME_ITEMS) - private List items; + private List items = new ArrayList<>(); public static final String SERIALIZED_NAME_KIND = "kind"; @SerializedName(SERIALIZED_NAME_KIND) @@ -75,7 +75,6 @@ public V1beta1ValidatingAdmissionPolicyBindingList() { } public V1beta1ValidatingAdmissionPolicyBindingList apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -89,14 +88,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1beta1ValidatingAdmissionPolicyBindingList items(List items) { - this.items = items; return this; } @@ -113,19 +110,17 @@ public V1beta1ValidatingAdmissionPolicyBindingList addItemsItem(V1beta1Validatin * List of PolicyBinding. * @return items **/ - @jakarta.annotation.Nullable + @jakarta.annotation.Nonnull public List getItems() { return items; } - public void setItems(List items) { this.items = items; } public V1beta1ValidatingAdmissionPolicyBindingList kind(String kind) { - this.kind = kind; return this; } @@ -139,14 +134,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1beta1ValidatingAdmissionPolicyBindingList metadata(V1ListMeta metadata) { - this.metadata = metadata; return this; } @@ -160,7 +153,6 @@ public V1ListMeta getMetadata() { return metadata; } - public void setMetadata(V1ListMeta metadata) { this.metadata = metadata; } @@ -224,51 +216,56 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("items"); } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1beta1ValidatingAdmissionPolicyBindingList + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1beta1ValidatingAdmissionPolicyBindingList */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1beta1ValidatingAdmissionPolicyBindingList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1beta1ValidatingAdmissionPolicyBindingList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1beta1ValidatingAdmissionPolicyBindingList is not found in the empty JSON string", V1beta1ValidatingAdmissionPolicyBindingList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1beta1ValidatingAdmissionPolicyBindingList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta1ValidatingAdmissionPolicyBindingList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta1ValidatingAdmissionPolicyBindingList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : V1beta1ValidatingAdmissionPolicyBindingList.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } - if (jsonObj.get("items") != null && !jsonObj.get("items").isJsonNull()) { - JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); - if (jsonArrayitems != null) { - // ensure the json data is an array - if (!jsonObj.get("items").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `items` to be an array in the JSON string but got `%s`", jsonObj.get("items").toString())); - } - - // validate the optional field `items` (array) - for (int i = 0; i < jsonArrayitems.size(); i++) { - V1beta1ValidatingAdmissionPolicyBinding.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject()); - }; - } + // ensure the json data is an array + if (!jsonObj.get("items").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `items` to be an array in the JSON string but got `%s`", jsonObj.get("items").toString())); } + + JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); + // validate the required field `items` (array) + for (int i = 0; i < jsonArrayitems.size(); i++) { + V1beta1ValidatingAdmissionPolicyBinding.validateJsonElement(jsonArrayitems.get(i)); + }; if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ListMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ListMeta.validateJsonElement(jsonObj.get("metadata")); } } @@ -292,9 +289,9 @@ public void write(JsonWriter out, V1beta1ValidatingAdmissionPolicyBindingList va @Override public V1beta1ValidatingAdmissionPolicyBindingList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -321,3 +318,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicyBindingSpec.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicyBindingSpec.java index 5c868ead29..9701a97e41 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicyBindingSpec.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicyBindingSpec.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1beta1ParamRef; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * ValidatingAdmissionPolicyBindingSpec is the specification of the ValidatingAdmissionPolicyBinding. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1beta1ValidatingAdmissionPolicyBindingSpec { public static final String SERIALIZED_NAME_MATCH_RESOURCES = "matchResources"; @SerializedName(SERIALIZED_NAME_MATCH_RESOURCES) @@ -69,13 +69,12 @@ public class V1beta1ValidatingAdmissionPolicyBindingSpec { public static final String SERIALIZED_NAME_VALIDATION_ACTIONS = "validationActions"; @SerializedName(SERIALIZED_NAME_VALIDATION_ACTIONS) - private List validationActions; + private List validationActions = new ArrayList<>(); public V1beta1ValidatingAdmissionPolicyBindingSpec() { } public V1beta1ValidatingAdmissionPolicyBindingSpec matchResources(V1beta1MatchResources matchResources) { - this.matchResources = matchResources; return this; } @@ -89,14 +88,12 @@ public V1beta1MatchResources getMatchResources() { return matchResources; } - public void setMatchResources(V1beta1MatchResources matchResources) { this.matchResources = matchResources; } public V1beta1ValidatingAdmissionPolicyBindingSpec paramRef(V1beta1ParamRef paramRef) { - this.paramRef = paramRef; return this; } @@ -110,14 +107,12 @@ public V1beta1ParamRef getParamRef() { return paramRef; } - public void setParamRef(V1beta1ParamRef paramRef) { this.paramRef = paramRef; } public V1beta1ValidatingAdmissionPolicyBindingSpec policyName(String policyName) { - this.policyName = policyName; return this; } @@ -131,14 +126,12 @@ public String getPolicyName() { return policyName; } - public void setPolicyName(String policyName) { this.policyName = policyName; } public V1beta1ValidatingAdmissionPolicyBindingSpec validationActions(List validationActions) { - this.validationActions = validationActions; return this; } @@ -160,7 +153,6 @@ public List getValidationActions() { return validationActions; } - public void setValidationActions(List validationActions) { this.validationActions = validationActions; } @@ -227,38 +219,39 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1beta1ValidatingAdmissionPolicyBindingSpec + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1beta1ValidatingAdmissionPolicyBindingSpec */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1beta1ValidatingAdmissionPolicyBindingSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1beta1ValidatingAdmissionPolicyBindingSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1beta1ValidatingAdmissionPolicyBindingSpec is not found in the empty JSON string", V1beta1ValidatingAdmissionPolicyBindingSpec.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1beta1ValidatingAdmissionPolicyBindingSpec.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta1ValidatingAdmissionPolicyBindingSpec` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta1ValidatingAdmissionPolicyBindingSpec` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `matchResources` if (jsonObj.get("matchResources") != null && !jsonObj.get("matchResources").isJsonNull()) { - V1beta1MatchResources.validateJsonObject(jsonObj.getAsJsonObject("matchResources")); + V1beta1MatchResources.validateJsonElement(jsonObj.get("matchResources")); } // validate the optional field `paramRef` if (jsonObj.get("paramRef") != null && !jsonObj.get("paramRef").isJsonNull()) { - V1beta1ParamRef.validateJsonObject(jsonObj.getAsJsonObject("paramRef")); + V1beta1ParamRef.validateJsonElement(jsonObj.get("paramRef")); } if ((jsonObj.get("policyName") != null && !jsonObj.get("policyName").isJsonNull()) && !jsonObj.get("policyName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `policyName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("policyName").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("validationActions") != null && !jsonObj.get("validationActions").isJsonArray()) { + if (jsonObj.get("validationActions") != null && !jsonObj.get("validationActions").isJsonNull() && !jsonObj.get("validationActions").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `validationActions` to be an array in the JSON string but got `%s`", jsonObj.get("validationActions").toString())); } } @@ -283,9 +276,9 @@ public void write(JsonWriter out, V1beta1ValidatingAdmissionPolicyBindingSpec va @Override public V1beta1ValidatingAdmissionPolicyBindingSpec read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -312,3 +305,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicyList.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicyList.java index 8889716032..46b32cbd47 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicyList.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicyList.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1beta1ValidatingAdmissionPolicy; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * ValidatingAdmissionPolicyList is a list of ValidatingAdmissionPolicy. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1beta1ValidatingAdmissionPolicyList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -61,7 +61,7 @@ public class V1beta1ValidatingAdmissionPolicyList implements io.kubernetes.clien public static final String SERIALIZED_NAME_ITEMS = "items"; @SerializedName(SERIALIZED_NAME_ITEMS) - private List items; + private List items = new ArrayList<>(); public static final String SERIALIZED_NAME_KIND = "kind"; @SerializedName(SERIALIZED_NAME_KIND) @@ -75,7 +75,6 @@ public V1beta1ValidatingAdmissionPolicyList() { } public V1beta1ValidatingAdmissionPolicyList apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -89,14 +88,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1beta1ValidatingAdmissionPolicyList items(List items) { - this.items = items; return this; } @@ -113,19 +110,17 @@ public V1beta1ValidatingAdmissionPolicyList addItemsItem(V1beta1ValidatingAdmiss * List of ValidatingAdmissionPolicy. * @return items **/ - @jakarta.annotation.Nullable + @jakarta.annotation.Nonnull public List getItems() { return items; } - public void setItems(List items) { this.items = items; } public V1beta1ValidatingAdmissionPolicyList kind(String kind) { - this.kind = kind; return this; } @@ -139,14 +134,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1beta1ValidatingAdmissionPolicyList metadata(V1ListMeta metadata) { - this.metadata = metadata; return this; } @@ -160,7 +153,6 @@ public V1ListMeta getMetadata() { return metadata; } - public void setMetadata(V1ListMeta metadata) { this.metadata = metadata; } @@ -224,51 +216,56 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("items"); } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1beta1ValidatingAdmissionPolicyList + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1beta1ValidatingAdmissionPolicyList */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1beta1ValidatingAdmissionPolicyList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1beta1ValidatingAdmissionPolicyList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1beta1ValidatingAdmissionPolicyList is not found in the empty JSON string", V1beta1ValidatingAdmissionPolicyList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1beta1ValidatingAdmissionPolicyList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta1ValidatingAdmissionPolicyList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta1ValidatingAdmissionPolicyList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : V1beta1ValidatingAdmissionPolicyList.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } - if (jsonObj.get("items") != null && !jsonObj.get("items").isJsonNull()) { - JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); - if (jsonArrayitems != null) { - // ensure the json data is an array - if (!jsonObj.get("items").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `items` to be an array in the JSON string but got `%s`", jsonObj.get("items").toString())); - } - - // validate the optional field `items` (array) - for (int i = 0; i < jsonArrayitems.size(); i++) { - V1beta1ValidatingAdmissionPolicy.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject()); - }; - } + // ensure the json data is an array + if (!jsonObj.get("items").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `items` to be an array in the JSON string but got `%s`", jsonObj.get("items").toString())); } + + JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); + // validate the required field `items` (array) + for (int i = 0; i < jsonArrayitems.size(); i++) { + V1beta1ValidatingAdmissionPolicy.validateJsonElement(jsonArrayitems.get(i)); + }; if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ListMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ListMeta.validateJsonElement(jsonObj.get("metadata")); } } @@ -292,9 +289,9 @@ public void write(JsonWriter out, V1beta1ValidatingAdmissionPolicyList value) th @Override public V1beta1ValidatingAdmissionPolicyList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -321,3 +318,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicySpec.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicySpec.java index 4c7da90c1d..a98d9717ea 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicySpec.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicySpec.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -27,6 +27,7 @@ import io.kubernetes.client.openapi.models.V1beta1Variable; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -49,7 +50,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -57,11 +57,11 @@ /** * ValidatingAdmissionPolicySpec is the specification of the desired behavior of the AdmissionPolicy. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1beta1ValidatingAdmissionPolicySpec { public static final String SERIALIZED_NAME_AUDIT_ANNOTATIONS = "auditAnnotations"; @SerializedName(SERIALIZED_NAME_AUDIT_ANNOTATIONS) - private List auditAnnotations; + private List auditAnnotations = new ArrayList<>(); public static final String SERIALIZED_NAME_FAILURE_POLICY = "failurePolicy"; @SerializedName(SERIALIZED_NAME_FAILURE_POLICY) @@ -69,7 +69,7 @@ public class V1beta1ValidatingAdmissionPolicySpec { public static final String SERIALIZED_NAME_MATCH_CONDITIONS = "matchConditions"; @SerializedName(SERIALIZED_NAME_MATCH_CONDITIONS) - private List matchConditions; + private List matchConditions = new ArrayList<>(); public static final String SERIALIZED_NAME_MATCH_CONSTRAINTS = "matchConstraints"; @SerializedName(SERIALIZED_NAME_MATCH_CONSTRAINTS) @@ -81,17 +81,16 @@ public class V1beta1ValidatingAdmissionPolicySpec { public static final String SERIALIZED_NAME_VALIDATIONS = "validations"; @SerializedName(SERIALIZED_NAME_VALIDATIONS) - private List validations; + private List validations = new ArrayList<>(); public static final String SERIALIZED_NAME_VARIABLES = "variables"; @SerializedName(SERIALIZED_NAME_VARIABLES) - private List variables; + private List variables = new ArrayList<>(); public V1beta1ValidatingAdmissionPolicySpec() { } public V1beta1ValidatingAdmissionPolicySpec auditAnnotations(List auditAnnotations) { - this.auditAnnotations = auditAnnotations; return this; } @@ -113,14 +112,12 @@ public List getAuditAnnotations() { return auditAnnotations; } - public void setAuditAnnotations(List auditAnnotations) { this.auditAnnotations = auditAnnotations; } public V1beta1ValidatingAdmissionPolicySpec failurePolicy(String failurePolicy) { - this.failurePolicy = failurePolicy; return this; } @@ -134,14 +131,12 @@ public String getFailurePolicy() { return failurePolicy; } - public void setFailurePolicy(String failurePolicy) { this.failurePolicy = failurePolicy; } public V1beta1ValidatingAdmissionPolicySpec matchConditions(List matchConditions) { - this.matchConditions = matchConditions; return this; } @@ -163,14 +158,12 @@ public List getMatchConditions() { return matchConditions; } - public void setMatchConditions(List matchConditions) { this.matchConditions = matchConditions; } public V1beta1ValidatingAdmissionPolicySpec matchConstraints(V1beta1MatchResources matchConstraints) { - this.matchConstraints = matchConstraints; return this; } @@ -184,14 +177,12 @@ public V1beta1MatchResources getMatchConstraints() { return matchConstraints; } - public void setMatchConstraints(V1beta1MatchResources matchConstraints) { this.matchConstraints = matchConstraints; } public V1beta1ValidatingAdmissionPolicySpec paramKind(V1beta1ParamKind paramKind) { - this.paramKind = paramKind; return this; } @@ -205,14 +196,12 @@ public V1beta1ParamKind getParamKind() { return paramKind; } - public void setParamKind(V1beta1ParamKind paramKind) { this.paramKind = paramKind; } public V1beta1ValidatingAdmissionPolicySpec validations(List validations) { - this.validations = validations; return this; } @@ -234,14 +223,12 @@ public List getValidations() { return validations; } - public void setValidations(List validations) { this.validations = validations; } public V1beta1ValidatingAdmissionPolicySpec variables(List variables) { - this.variables = variables; return this; } @@ -263,7 +250,6 @@ public List getVariables() { return variables; } - public void setVariables(List variables) { this.variables = variables; } @@ -339,25 +325,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1beta1ValidatingAdmissionPolicySpec + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1beta1ValidatingAdmissionPolicySpec */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1beta1ValidatingAdmissionPolicySpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1beta1ValidatingAdmissionPolicySpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1beta1ValidatingAdmissionPolicySpec is not found in the empty JSON string", V1beta1ValidatingAdmissionPolicySpec.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1beta1ValidatingAdmissionPolicySpec.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta1ValidatingAdmissionPolicySpec` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta1ValidatingAdmissionPolicySpec` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (jsonObj.get("auditAnnotations") != null && !jsonObj.get("auditAnnotations").isJsonNull()) { JsonArray jsonArrayauditAnnotations = jsonObj.getAsJsonArray("auditAnnotations"); if (jsonArrayauditAnnotations != null) { @@ -368,7 +355,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `auditAnnotations` (array) for (int i = 0; i < jsonArrayauditAnnotations.size(); i++) { - V1beta1AuditAnnotation.validateJsonObject(jsonArrayauditAnnotations.get(i).getAsJsonObject()); + V1beta1AuditAnnotation.validateJsonElement(jsonArrayauditAnnotations.get(i)); }; } } @@ -385,17 +372,17 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `matchConditions` (array) for (int i = 0; i < jsonArraymatchConditions.size(); i++) { - V1beta1MatchCondition.validateJsonObject(jsonArraymatchConditions.get(i).getAsJsonObject()); + V1beta1MatchCondition.validateJsonElement(jsonArraymatchConditions.get(i)); }; } } // validate the optional field `matchConstraints` if (jsonObj.get("matchConstraints") != null && !jsonObj.get("matchConstraints").isJsonNull()) { - V1beta1MatchResources.validateJsonObject(jsonObj.getAsJsonObject("matchConstraints")); + V1beta1MatchResources.validateJsonElement(jsonObj.get("matchConstraints")); } // validate the optional field `paramKind` if (jsonObj.get("paramKind") != null && !jsonObj.get("paramKind").isJsonNull()) { - V1beta1ParamKind.validateJsonObject(jsonObj.getAsJsonObject("paramKind")); + V1beta1ParamKind.validateJsonElement(jsonObj.get("paramKind")); } if (jsonObj.get("validations") != null && !jsonObj.get("validations").isJsonNull()) { JsonArray jsonArrayvalidations = jsonObj.getAsJsonArray("validations"); @@ -407,7 +394,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `validations` (array) for (int i = 0; i < jsonArrayvalidations.size(); i++) { - V1beta1Validation.validateJsonObject(jsonArrayvalidations.get(i).getAsJsonObject()); + V1beta1Validation.validateJsonElement(jsonArrayvalidations.get(i)); }; } } @@ -421,7 +408,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `variables` (array) for (int i = 0; i < jsonArrayvariables.size(); i++) { - V1beta1Variable.validateJsonObject(jsonArrayvariables.get(i).getAsJsonObject()); + V1beta1Variable.validateJsonElement(jsonArrayvariables.get(i)); }; } } @@ -447,9 +434,9 @@ public void write(JsonWriter out, V1beta1ValidatingAdmissionPolicySpec value) th @Override public V1beta1ValidatingAdmissionPolicySpec read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -476,3 +463,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicyStatus.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicyStatus.java index ce8753b2d3..2319123c4e 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicyStatus.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicyStatus.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1beta1TypeChecking; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,11 +53,11 @@ /** * ValidatingAdmissionPolicyStatus represents the status of an admission validation policy. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1beta1ValidatingAdmissionPolicyStatus { public static final String SERIALIZED_NAME_CONDITIONS = "conditions"; @SerializedName(SERIALIZED_NAME_CONDITIONS) - private List conditions; + private List conditions = new ArrayList<>(); public static final String SERIALIZED_NAME_OBSERVED_GENERATION = "observedGeneration"; @SerializedName(SERIALIZED_NAME_OBSERVED_GENERATION) @@ -71,7 +71,6 @@ public V1beta1ValidatingAdmissionPolicyStatus() { } public V1beta1ValidatingAdmissionPolicyStatus conditions(List conditions) { - this.conditions = conditions; return this; } @@ -93,14 +92,12 @@ public List getConditions() { return conditions; } - public void setConditions(List conditions) { this.conditions = conditions; } public V1beta1ValidatingAdmissionPolicyStatus observedGeneration(Long observedGeneration) { - this.observedGeneration = observedGeneration; return this; } @@ -114,14 +111,12 @@ public Long getObservedGeneration() { return observedGeneration; } - public void setObservedGeneration(Long observedGeneration) { this.observedGeneration = observedGeneration; } public V1beta1ValidatingAdmissionPolicyStatus typeChecking(V1beta1TypeChecking typeChecking) { - this.typeChecking = typeChecking; return this; } @@ -135,7 +130,6 @@ public V1beta1TypeChecking getTypeChecking() { return typeChecking; } - public void setTypeChecking(V1beta1TypeChecking typeChecking) { this.typeChecking = typeChecking; } @@ -199,25 +193,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1beta1ValidatingAdmissionPolicyStatus + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1beta1ValidatingAdmissionPolicyStatus */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1beta1ValidatingAdmissionPolicyStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1beta1ValidatingAdmissionPolicyStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1beta1ValidatingAdmissionPolicyStatus is not found in the empty JSON string", V1beta1ValidatingAdmissionPolicyStatus.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1beta1ValidatingAdmissionPolicyStatus.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta1ValidatingAdmissionPolicyStatus` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta1ValidatingAdmissionPolicyStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (jsonObj.get("conditions") != null && !jsonObj.get("conditions").isJsonNull()) { JsonArray jsonArrayconditions = jsonObj.getAsJsonArray("conditions"); if (jsonArrayconditions != null) { @@ -228,13 +223,13 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `conditions` (array) for (int i = 0; i < jsonArrayconditions.size(); i++) { - V1Condition.validateJsonObject(jsonArrayconditions.get(i).getAsJsonObject()); + V1Condition.validateJsonElement(jsonArrayconditions.get(i)); }; } } // validate the optional field `typeChecking` if (jsonObj.get("typeChecking") != null && !jsonObj.get("typeChecking").isJsonNull()) { - V1beta1TypeChecking.validateJsonObject(jsonObj.getAsJsonObject("typeChecking")); + V1beta1TypeChecking.validateJsonElement(jsonObj.get("typeChecking")); } } @@ -258,9 +253,9 @@ public void write(JsonWriter out, V1beta1ValidatingAdmissionPolicyStatus value) @Override public V1beta1ValidatingAdmissionPolicyStatus read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -287,3 +282,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1Validation.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1Validation.java index 0074760adb..a82c1af1df 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1Validation.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1Validation.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * Validation specifies the CEL expression which is used to apply the validation. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1beta1Validation { public static final String SERIALIZED_NAME_EXPRESSION = "expression"; @SerializedName(SERIALIZED_NAME_EXPRESSION) @@ -71,7 +71,6 @@ public V1beta1Validation() { } public V1beta1Validation expression(String expression) { - this.expression = expression; return this; } @@ -85,14 +84,12 @@ public String getExpression() { return expression; } - public void setExpression(String expression) { this.expression = expression; } public V1beta1Validation message(String message) { - this.message = message; return this; } @@ -106,14 +103,12 @@ public String getMessage() { return message; } - public void setMessage(String message) { this.message = message; } public V1beta1Validation messageExpression(String messageExpression) { - this.messageExpression = messageExpression; return this; } @@ -127,14 +122,12 @@ public String getMessageExpression() { return messageExpression; } - public void setMessageExpression(String messageExpression) { this.messageExpression = messageExpression; } public V1beta1Validation reason(String reason) { - this.reason = reason; return this; } @@ -148,7 +141,6 @@ public String getReason() { return reason; } - public void setReason(String reason) { this.reason = reason; } @@ -216,32 +208,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1beta1Validation + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1beta1Validation */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1beta1Validation.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1beta1Validation.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1beta1Validation is not found in the empty JSON string", V1beta1Validation.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1beta1Validation.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta1Validation` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta1Validation` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1beta1Validation.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("expression").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `expression` to be a primitive type in the JSON string but got `%s`", jsonObj.get("expression").toString())); } @@ -276,9 +269,9 @@ public void write(JsonWriter out, V1beta1Validation value) throws IOException { @Override public V1beta1Validation read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -305,3 +298,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1Variable.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1Variable.java index b1dc32a92a..f759768258 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1Variable.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1Variable.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * Variable is the definition of a variable that is used for composition. A variable is defined as a named expression. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1beta1Variable { public static final String SERIALIZED_NAME_EXPRESSION = "expression"; @SerializedName(SERIALIZED_NAME_EXPRESSION) @@ -63,7 +63,6 @@ public V1beta1Variable() { } public V1beta1Variable expression(String expression) { - this.expression = expression; return this; } @@ -77,14 +76,12 @@ public String getExpression() { return expression; } - public void setExpression(String expression) { this.expression = expression; } public V1beta1Variable name(String name) { - this.name = name; return this; } @@ -98,7 +95,6 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } @@ -161,32 +157,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1beta1Variable + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1beta1Variable */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1beta1Variable.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1beta1Variable.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1beta1Variable is not found in the empty JSON string", V1beta1Variable.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1beta1Variable.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta1Variable` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta1Variable` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1beta1Variable.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("expression").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `expression` to be a primitive type in the JSON string but got `%s`", jsonObj.get("expression").toString())); } @@ -215,9 +212,9 @@ public void write(JsonWriter out, V1beta1Variable value) throws IOException { @Override public V1beta1Variable read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -244,3 +241,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3ExemptPriorityLevelConfiguration.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3ExemptPriorityLevelConfiguration.java index cc6698cd29..2a4f0de3e9 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3ExemptPriorityLevelConfiguration.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3ExemptPriorityLevelConfiguration.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * ExemptPriorityLevelConfiguration describes the configurable aspects of the handling of exempt requests. In the mandatory exempt configuration object the values in the fields here can be modified by authorized users, unlike the rest of the `spec`. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1beta3ExemptPriorityLevelConfiguration { public static final String SERIALIZED_NAME_LENDABLE_PERCENT = "lendablePercent"; @SerializedName(SERIALIZED_NAME_LENDABLE_PERCENT) @@ -63,7 +63,6 @@ public V1beta3ExemptPriorityLevelConfiguration() { } public V1beta3ExemptPriorityLevelConfiguration lendablePercent(Integer lendablePercent) { - this.lendablePercent = lendablePercent; return this; } @@ -77,14 +76,12 @@ public Integer getLendablePercent() { return lendablePercent; } - public void setLendablePercent(Integer lendablePercent) { this.lendablePercent = lendablePercent; } public V1beta3ExemptPriorityLevelConfiguration nominalConcurrencyShares(Integer nominalConcurrencyShares) { - this.nominalConcurrencyShares = nominalConcurrencyShares; return this; } @@ -98,7 +95,6 @@ public Integer getNominalConcurrencyShares() { return nominalConcurrencyShares; } - public void setNominalConcurrencyShares(Integer nominalConcurrencyShares) { this.nominalConcurrencyShares = nominalConcurrencyShares; } @@ -159,25 +155,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1beta3ExemptPriorityLevelConfiguration + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1beta3ExemptPriorityLevelConfiguration */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1beta3ExemptPriorityLevelConfiguration.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1beta3ExemptPriorityLevelConfiguration.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1beta3ExemptPriorityLevelConfiguration is not found in the empty JSON string", V1beta3ExemptPriorityLevelConfiguration.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1beta3ExemptPriorityLevelConfiguration.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta3ExemptPriorityLevelConfiguration` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta3ExemptPriorityLevelConfiguration` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -200,9 +197,9 @@ public void write(JsonWriter out, V1beta3ExemptPriorityLevelConfiguration value) @Override public V1beta3ExemptPriorityLevelConfiguration read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -229,3 +226,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowDistinguisherMethod.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowDistinguisherMethod.java index 4030f243c0..8f8c6199d1 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowDistinguisherMethod.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowDistinguisherMethod.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * FlowDistinguisherMethod specifies the method of a flow distinguisher. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1beta3FlowDistinguisherMethod { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) @@ -59,7 +59,6 @@ public V1beta3FlowDistinguisherMethod() { } public V1beta3FlowDistinguisherMethod type(String type) { - this.type = type; return this; } @@ -73,7 +72,6 @@ public String getType() { return type; } - public void setType(String type) { this.type = type; } @@ -132,32 +130,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1beta3FlowDistinguisherMethod + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1beta3FlowDistinguisherMethod */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1beta3FlowDistinguisherMethod.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1beta3FlowDistinguisherMethod.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1beta3FlowDistinguisherMethod is not found in the empty JSON string", V1beta3FlowDistinguisherMethod.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1beta3FlowDistinguisherMethod.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta3FlowDistinguisherMethod` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta3FlowDistinguisherMethod` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1beta3FlowDistinguisherMethod.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } @@ -183,9 +182,9 @@ public void write(JsonWriter out, V1beta3FlowDistinguisherMethod value) throws I @Override public V1beta3FlowDistinguisherMethod read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -212,3 +211,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowSchema.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowSchema.java index 80e701ae01..81816c41aa 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowSchema.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowSchema.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1beta3FlowSchemaSpec; import io.kubernetes.client.openapi.models.V1beta3FlowSchemaStatus; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * FlowSchema defines the schema of a group of flows. Note that a flow is made up of a set of inbound API requests with similar attributes and is identified by a pair of strings: the name of the FlowSchema and a \"flow distinguisher\". */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1beta3FlowSchema implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -78,7 +78,6 @@ public V1beta3FlowSchema() { } public V1beta3FlowSchema apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -92,14 +91,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1beta3FlowSchema kind(String kind) { - this.kind = kind; return this; } @@ -113,14 +110,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1beta3FlowSchema metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -134,14 +129,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V1beta3FlowSchema spec(V1beta3FlowSchemaSpec spec) { - this.spec = spec; return this; } @@ -155,14 +148,12 @@ public V1beta3FlowSchemaSpec getSpec() { return spec; } - public void setSpec(V1beta3FlowSchemaSpec spec) { this.spec = spec; } public V1beta3FlowSchema status(V1beta3FlowSchemaStatus status) { - this.status = status; return this; } @@ -176,7 +167,6 @@ public V1beta3FlowSchemaStatus getStatus() { return status; } - public void setStatus(V1beta3FlowSchemaStatus status) { this.status = status; } @@ -246,25 +236,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1beta3FlowSchema + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1beta3FlowSchema */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1beta3FlowSchema.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1beta3FlowSchema.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1beta3FlowSchema is not found in the empty JSON string", V1beta3FlowSchema.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1beta3FlowSchema.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta3FlowSchema` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta3FlowSchema` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -273,15 +264,15 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } // validate the optional field `spec` if (jsonObj.get("spec") != null && !jsonObj.get("spec").isJsonNull()) { - V1beta3FlowSchemaSpec.validateJsonObject(jsonObj.getAsJsonObject("spec")); + V1beta3FlowSchemaSpec.validateJsonElement(jsonObj.get("spec")); } // validate the optional field `status` if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { - V1beta3FlowSchemaStatus.validateJsonObject(jsonObj.getAsJsonObject("status")); + V1beta3FlowSchemaStatus.validateJsonElement(jsonObj.get("status")); } } @@ -305,9 +296,9 @@ public void write(JsonWriter out, V1beta3FlowSchema value) throws IOException { @Override public V1beta3FlowSchema read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -334,3 +325,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowSchemaCondition.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowSchemaCondition.java index 88edbb9a92..f9ab202a25 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowSchemaCondition.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowSchemaCondition.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * FlowSchemaCondition describes conditions for a FlowSchema. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1beta3FlowSchemaCondition { public static final String SERIALIZED_NAME_LAST_TRANSITION_TIME = "lastTransitionTime"; @SerializedName(SERIALIZED_NAME_LAST_TRANSITION_TIME) @@ -76,7 +76,6 @@ public V1beta3FlowSchemaCondition() { } public V1beta3FlowSchemaCondition lastTransitionTime(OffsetDateTime lastTransitionTime) { - this.lastTransitionTime = lastTransitionTime; return this; } @@ -90,14 +89,12 @@ public OffsetDateTime getLastTransitionTime() { return lastTransitionTime; } - public void setLastTransitionTime(OffsetDateTime lastTransitionTime) { this.lastTransitionTime = lastTransitionTime; } public V1beta3FlowSchemaCondition message(String message) { - this.message = message; return this; } @@ -111,14 +108,12 @@ public String getMessage() { return message; } - public void setMessage(String message) { this.message = message; } public V1beta3FlowSchemaCondition reason(String reason) { - this.reason = reason; return this; } @@ -132,14 +127,12 @@ public String getReason() { return reason; } - public void setReason(String reason) { this.reason = reason; } public V1beta3FlowSchemaCondition status(String status) { - this.status = status; return this; } @@ -153,14 +146,12 @@ public String getStatus() { return status; } - public void setStatus(String status) { this.status = status; } public V1beta3FlowSchemaCondition type(String type) { - this.type = type; return this; } @@ -174,7 +165,6 @@ public String getType() { return type; } - public void setType(String type) { this.type = type; } @@ -244,25 +234,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1beta3FlowSchemaCondition + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1beta3FlowSchemaCondition */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1beta3FlowSchemaCondition.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1beta3FlowSchemaCondition.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1beta3FlowSchemaCondition is not found in the empty JSON string", V1beta3FlowSchemaCondition.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1beta3FlowSchemaCondition.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta3FlowSchemaCondition` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta3FlowSchemaCondition` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); } @@ -297,9 +288,9 @@ public void write(JsonWriter out, V1beta3FlowSchemaCondition value) throws IOExc @Override public V1beta3FlowSchemaCondition read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -326,3 +317,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowSchemaList.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowSchemaList.java index 27a60a29c9..8b459c53cb 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowSchemaList.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowSchemaList.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1beta3FlowSchema; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * FlowSchemaList is a list of FlowSchema objects. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1beta3FlowSchemaList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -75,7 +75,6 @@ public V1beta3FlowSchemaList() { } public V1beta3FlowSchemaList apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -89,14 +88,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1beta3FlowSchemaList items(List items) { - this.items = items; return this; } @@ -118,14 +115,12 @@ public List getItems() { return items; } - public void setItems(List items) { this.items = items; } public V1beta3FlowSchemaList kind(String kind) { - this.kind = kind; return this; } @@ -139,14 +134,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1beta3FlowSchemaList metadata(V1ListMeta metadata) { - this.metadata = metadata; return this; } @@ -160,7 +153,6 @@ public V1ListMeta getMetadata() { return metadata; } - public void setMetadata(V1ListMeta metadata) { this.metadata = metadata; } @@ -228,32 +220,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1beta3FlowSchemaList + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1beta3FlowSchemaList */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1beta3FlowSchemaList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1beta3FlowSchemaList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1beta3FlowSchemaList is not found in the empty JSON string", V1beta3FlowSchemaList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1beta3FlowSchemaList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta3FlowSchemaList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta3FlowSchemaList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1beta3FlowSchemaList.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -265,14 +258,14 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); // validate the required field `items` (array) for (int i = 0; i < jsonArrayitems.size(); i++) { - V1beta3FlowSchema.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject()); + V1beta3FlowSchema.validateJsonElement(jsonArrayitems.get(i)); }; if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ListMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ListMeta.validateJsonElement(jsonObj.get("metadata")); } } @@ -296,9 +289,9 @@ public void write(JsonWriter out, V1beta3FlowSchemaList value) throws IOExceptio @Override public V1beta3FlowSchemaList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -325,3 +318,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowSchemaSpec.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowSchemaSpec.java index 59c6d64ca0..31788b718a 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowSchemaSpec.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowSchemaSpec.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -24,6 +24,7 @@ import io.kubernetes.client.openapi.models.V1beta3PriorityLevelConfigurationReference; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -46,7 +47,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -54,7 +54,7 @@ /** * FlowSchemaSpec describes how the FlowSchema's specification looks like. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1beta3FlowSchemaSpec { public static final String SERIALIZED_NAME_DISTINGUISHER_METHOD = "distinguisherMethod"; @SerializedName(SERIALIZED_NAME_DISTINGUISHER_METHOD) @@ -70,13 +70,12 @@ public class V1beta3FlowSchemaSpec { public static final String SERIALIZED_NAME_RULES = "rules"; @SerializedName(SERIALIZED_NAME_RULES) - private List rules; + private List rules = new ArrayList<>(); public V1beta3FlowSchemaSpec() { } public V1beta3FlowSchemaSpec distinguisherMethod(V1beta3FlowDistinguisherMethod distinguisherMethod) { - this.distinguisherMethod = distinguisherMethod; return this; } @@ -90,14 +89,12 @@ public V1beta3FlowDistinguisherMethod getDistinguisherMethod() { return distinguisherMethod; } - public void setDistinguisherMethod(V1beta3FlowDistinguisherMethod distinguisherMethod) { this.distinguisherMethod = distinguisherMethod; } public V1beta3FlowSchemaSpec matchingPrecedence(Integer matchingPrecedence) { - this.matchingPrecedence = matchingPrecedence; return this; } @@ -111,14 +108,12 @@ public Integer getMatchingPrecedence() { return matchingPrecedence; } - public void setMatchingPrecedence(Integer matchingPrecedence) { this.matchingPrecedence = matchingPrecedence; } public V1beta3FlowSchemaSpec priorityLevelConfiguration(V1beta3PriorityLevelConfigurationReference priorityLevelConfiguration) { - this.priorityLevelConfiguration = priorityLevelConfiguration; return this; } @@ -132,14 +127,12 @@ public V1beta3PriorityLevelConfigurationReference getPriorityLevelConfiguration( return priorityLevelConfiguration; } - public void setPriorityLevelConfiguration(V1beta3PriorityLevelConfigurationReference priorityLevelConfiguration) { this.priorityLevelConfiguration = priorityLevelConfiguration; } public V1beta3FlowSchemaSpec rules(List rules) { - this.rules = rules; return this; } @@ -161,7 +154,6 @@ public List getRules() { return rules; } - public void setRules(List rules) { this.rules = rules; } @@ -229,38 +221,39 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1beta3FlowSchemaSpec + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1beta3FlowSchemaSpec */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1beta3FlowSchemaSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1beta3FlowSchemaSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1beta3FlowSchemaSpec is not found in the empty JSON string", V1beta3FlowSchemaSpec.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1beta3FlowSchemaSpec.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta3FlowSchemaSpec` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta3FlowSchemaSpec` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1beta3FlowSchemaSpec.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `distinguisherMethod` if (jsonObj.get("distinguisherMethod") != null && !jsonObj.get("distinguisherMethod").isJsonNull()) { - V1beta3FlowDistinguisherMethod.validateJsonObject(jsonObj.getAsJsonObject("distinguisherMethod")); + V1beta3FlowDistinguisherMethod.validateJsonElement(jsonObj.get("distinguisherMethod")); } // validate the required field `priorityLevelConfiguration` - V1beta3PriorityLevelConfigurationReference.validateJsonObject(jsonObj.getAsJsonObject("priorityLevelConfiguration")); + V1beta3PriorityLevelConfigurationReference.validateJsonElement(jsonObj.get("priorityLevelConfiguration")); if (jsonObj.get("rules") != null && !jsonObj.get("rules").isJsonNull()) { JsonArray jsonArrayrules = jsonObj.getAsJsonArray("rules"); if (jsonArrayrules != null) { @@ -271,7 +264,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `rules` (array) for (int i = 0; i < jsonArrayrules.size(); i++) { - V1beta3PolicyRulesWithSubjects.validateJsonObject(jsonArrayrules.get(i).getAsJsonObject()); + V1beta3PolicyRulesWithSubjects.validateJsonElement(jsonArrayrules.get(i)); }; } } @@ -297,9 +290,9 @@ public void write(JsonWriter out, V1beta3FlowSchemaSpec value) throws IOExceptio @Override public V1beta3FlowSchemaSpec read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -326,3 +319,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowSchemaStatus.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowSchemaStatus.java index 436fb9963e..d6cc934d1f 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowSchemaStatus.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowSchemaStatus.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1beta3FlowSchemaCondition; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,17 +52,16 @@ /** * FlowSchemaStatus represents the current state of a FlowSchema. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1beta3FlowSchemaStatus { public static final String SERIALIZED_NAME_CONDITIONS = "conditions"; @SerializedName(SERIALIZED_NAME_CONDITIONS) - private List conditions; + private List conditions = new ArrayList<>(); public V1beta3FlowSchemaStatus() { } public V1beta3FlowSchemaStatus conditions(List conditions) { - this.conditions = conditions; return this; } @@ -84,7 +83,6 @@ public List getConditions() { return conditions; } - public void setConditions(List conditions) { this.conditions = conditions; } @@ -142,25 +140,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1beta3FlowSchemaStatus + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1beta3FlowSchemaStatus */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1beta3FlowSchemaStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1beta3FlowSchemaStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1beta3FlowSchemaStatus is not found in the empty JSON string", V1beta3FlowSchemaStatus.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1beta3FlowSchemaStatus.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta3FlowSchemaStatus` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta3FlowSchemaStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (jsonObj.get("conditions") != null && !jsonObj.get("conditions").isJsonNull()) { JsonArray jsonArrayconditions = jsonObj.getAsJsonArray("conditions"); if (jsonArrayconditions != null) { @@ -171,7 +170,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `conditions` (array) for (int i = 0; i < jsonArrayconditions.size(); i++) { - V1beta3FlowSchemaCondition.validateJsonObject(jsonArrayconditions.get(i).getAsJsonObject()); + V1beta3FlowSchemaCondition.validateJsonElement(jsonArrayconditions.get(i)); }; } } @@ -197,9 +196,9 @@ public void write(JsonWriter out, V1beta3FlowSchemaStatus value) throws IOExcept @Override public V1beta3FlowSchemaStatus read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -226,3 +225,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3GroupSubject.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3GroupSubject.java index 545fe094e6..3b07617139 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3GroupSubject.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3GroupSubject.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * GroupSubject holds detailed information for group-kind subject. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1beta3GroupSubject { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) @@ -59,7 +59,6 @@ public V1beta3GroupSubject() { } public V1beta3GroupSubject name(String name) { - this.name = name; return this; } @@ -73,7 +72,6 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } @@ -132,32 +130,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1beta3GroupSubject + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1beta3GroupSubject */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1beta3GroupSubject.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1beta3GroupSubject.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1beta3GroupSubject is not found in the empty JSON string", V1beta3GroupSubject.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1beta3GroupSubject.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta3GroupSubject` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta3GroupSubject` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1beta3GroupSubject.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } @@ -183,9 +182,9 @@ public void write(JsonWriter out, V1beta3GroupSubject value) throws IOException @Override public V1beta3GroupSubject read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -212,3 +211,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3LimitResponse.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3LimitResponse.java index 8ae7d97967..74be656704 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3LimitResponse.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3LimitResponse.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.openapi.models.V1beta3QueuingConfiguration; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * LimitResponse defines how to handle requests that can not be executed right now. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1beta3LimitResponse { public static final String SERIALIZED_NAME_QUEUING = "queuing"; @SerializedName(SERIALIZED_NAME_QUEUING) @@ -64,7 +64,6 @@ public V1beta3LimitResponse() { } public V1beta3LimitResponse queuing(V1beta3QueuingConfiguration queuing) { - this.queuing = queuing; return this; } @@ -78,14 +77,12 @@ public V1beta3QueuingConfiguration getQueuing() { return queuing; } - public void setQueuing(V1beta3QueuingConfiguration queuing) { this.queuing = queuing; } public V1beta3LimitResponse type(String type) { - this.type = type; return this; } @@ -99,7 +96,6 @@ public String getType() { return type; } - public void setType(String type) { this.type = type; } @@ -161,35 +157,36 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1beta3LimitResponse + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1beta3LimitResponse */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1beta3LimitResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1beta3LimitResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1beta3LimitResponse is not found in the empty JSON string", V1beta3LimitResponse.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1beta3LimitResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta3LimitResponse` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta3LimitResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1beta3LimitResponse.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `queuing` if (jsonObj.get("queuing") != null && !jsonObj.get("queuing").isJsonNull()) { - V1beta3QueuingConfiguration.validateJsonObject(jsonObj.getAsJsonObject("queuing")); + V1beta3QueuingConfiguration.validateJsonElement(jsonObj.get("queuing")); } if (!jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); @@ -216,9 +213,9 @@ public void write(JsonWriter out, V1beta3LimitResponse value) throws IOException @Override public V1beta3LimitResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -245,3 +242,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3LimitedPriorityLevelConfiguration.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3LimitedPriorityLevelConfiguration.java index a130360fd0..6e23126cf3 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3LimitedPriorityLevelConfiguration.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3LimitedPriorityLevelConfiguration.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.openapi.models.V1beta3LimitResponse; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * LimitedPriorityLevelConfiguration specifies how to handle requests that are subject to limits. It addresses two issues: - How are requests for this priority level limited? - What should be done with requests that exceed the limit? */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1beta3LimitedPriorityLevelConfiguration { public static final String SERIALIZED_NAME_BORROWING_LIMIT_PERCENT = "borrowingLimitPercent"; @SerializedName(SERIALIZED_NAME_BORROWING_LIMIT_PERCENT) @@ -72,7 +72,6 @@ public V1beta3LimitedPriorityLevelConfiguration() { } public V1beta3LimitedPriorityLevelConfiguration borrowingLimitPercent(Integer borrowingLimitPercent) { - this.borrowingLimitPercent = borrowingLimitPercent; return this; } @@ -86,14 +85,12 @@ public Integer getBorrowingLimitPercent() { return borrowingLimitPercent; } - public void setBorrowingLimitPercent(Integer borrowingLimitPercent) { this.borrowingLimitPercent = borrowingLimitPercent; } public V1beta3LimitedPriorityLevelConfiguration lendablePercent(Integer lendablePercent) { - this.lendablePercent = lendablePercent; return this; } @@ -107,14 +104,12 @@ public Integer getLendablePercent() { return lendablePercent; } - public void setLendablePercent(Integer lendablePercent) { this.lendablePercent = lendablePercent; } public V1beta3LimitedPriorityLevelConfiguration limitResponse(V1beta3LimitResponse limitResponse) { - this.limitResponse = limitResponse; return this; } @@ -128,14 +123,12 @@ public V1beta3LimitResponse getLimitResponse() { return limitResponse; } - public void setLimitResponse(V1beta3LimitResponse limitResponse) { this.limitResponse = limitResponse; } public V1beta3LimitedPriorityLevelConfiguration nominalConcurrencyShares(Integer nominalConcurrencyShares) { - this.nominalConcurrencyShares = nominalConcurrencyShares; return this; } @@ -149,7 +142,6 @@ public Integer getNominalConcurrencyShares() { return nominalConcurrencyShares; } - public void setNominalConcurrencyShares(Integer nominalConcurrencyShares) { this.nominalConcurrencyShares = nominalConcurrencyShares; } @@ -216,28 +208,29 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1beta3LimitedPriorityLevelConfiguration + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1beta3LimitedPriorityLevelConfiguration */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1beta3LimitedPriorityLevelConfiguration.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1beta3LimitedPriorityLevelConfiguration.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1beta3LimitedPriorityLevelConfiguration is not found in the empty JSON string", V1beta3LimitedPriorityLevelConfiguration.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1beta3LimitedPriorityLevelConfiguration.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta3LimitedPriorityLevelConfiguration` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta3LimitedPriorityLevelConfiguration` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `limitResponse` if (jsonObj.get("limitResponse") != null && !jsonObj.get("limitResponse").isJsonNull()) { - V1beta3LimitResponse.validateJsonObject(jsonObj.getAsJsonObject("limitResponse")); + V1beta3LimitResponse.validateJsonElement(jsonObj.get("limitResponse")); } } @@ -261,9 +254,9 @@ public void write(JsonWriter out, V1beta3LimitedPriorityLevelConfiguration value @Override public V1beta3LimitedPriorityLevelConfiguration read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -290,3 +283,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3NonResourcePolicyRule.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3NonResourcePolicyRule.java index 1d50eab396..3ba777dd52 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3NonResourcePolicyRule.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3NonResourcePolicyRule.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -43,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -51,7 +51,7 @@ /** * NonResourcePolicyRule is a predicate that matches non-resource requests according to their verb and the target non-resource URL. A NonResourcePolicyRule matches a request if and only if both (a) at least one member of verbs matches the request and (b) at least one member of nonResourceURLs matches the request. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1beta3NonResourcePolicyRule { public static final String SERIALIZED_NAME_NON_RESOURCE_U_R_LS = "nonResourceURLs"; @SerializedName(SERIALIZED_NAME_NON_RESOURCE_U_R_LS) @@ -65,7 +65,6 @@ public V1beta3NonResourcePolicyRule() { } public V1beta3NonResourcePolicyRule nonResourceURLs(List nonResourceURLs) { - this.nonResourceURLs = nonResourceURLs; return this; } @@ -87,14 +86,12 @@ public List getNonResourceURLs() { return nonResourceURLs; } - public void setNonResourceURLs(List nonResourceURLs) { this.nonResourceURLs = nonResourceURLs; } public V1beta3NonResourcePolicyRule verbs(List verbs) { - this.verbs = verbs; return this; } @@ -116,7 +113,6 @@ public List getVerbs() { return verbs; } - public void setVerbs(List verbs) { this.verbs = verbs; } @@ -179,32 +175,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1beta3NonResourcePolicyRule + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1beta3NonResourcePolicyRule */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1beta3NonResourcePolicyRule.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1beta3NonResourcePolicyRule.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1beta3NonResourcePolicyRule is not found in the empty JSON string", V1beta3NonResourcePolicyRule.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1beta3NonResourcePolicyRule.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta3NonResourcePolicyRule` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta3NonResourcePolicyRule` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1beta3NonResourcePolicyRule.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the required json array is present if (jsonObj.get("nonResourceURLs") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); @@ -239,9 +236,9 @@ public void write(JsonWriter out, V1beta3NonResourcePolicyRule value) throws IOE @Override public V1beta3NonResourcePolicyRule read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -268,3 +265,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3PolicyRulesWithSubjects.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3PolicyRulesWithSubjects.java index f40e1495d3..778ecfd41b 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3PolicyRulesWithSubjects.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3PolicyRulesWithSubjects.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -24,6 +24,7 @@ import io.kubernetes.client.openapi.models.V1beta3Subject; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -46,7 +47,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -54,15 +54,15 @@ /** * PolicyRulesWithSubjects prescribes a test that applies to a request to an apiserver. The test considers the subject making the request, the verb being requested, and the resource to be acted upon. This PolicyRulesWithSubjects matches a request if and only if both (a) at least one member of subjects matches the request and (b) at least one member of resourceRules or nonResourceRules matches the request. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1beta3PolicyRulesWithSubjects { public static final String SERIALIZED_NAME_NON_RESOURCE_RULES = "nonResourceRules"; @SerializedName(SERIALIZED_NAME_NON_RESOURCE_RULES) - private List nonResourceRules; + private List nonResourceRules = new ArrayList<>(); public static final String SERIALIZED_NAME_RESOURCE_RULES = "resourceRules"; @SerializedName(SERIALIZED_NAME_RESOURCE_RULES) - private List resourceRules; + private List resourceRules = new ArrayList<>(); public static final String SERIALIZED_NAME_SUBJECTS = "subjects"; @SerializedName(SERIALIZED_NAME_SUBJECTS) @@ -72,7 +72,6 @@ public V1beta3PolicyRulesWithSubjects() { } public V1beta3PolicyRulesWithSubjects nonResourceRules(List nonResourceRules) { - this.nonResourceRules = nonResourceRules; return this; } @@ -94,14 +93,12 @@ public List getNonResourceRules() { return nonResourceRules; } - public void setNonResourceRules(List nonResourceRules) { this.nonResourceRules = nonResourceRules; } public V1beta3PolicyRulesWithSubjects resourceRules(List resourceRules) { - this.resourceRules = resourceRules; return this; } @@ -123,14 +120,12 @@ public List getResourceRules() { return resourceRules; } - public void setResourceRules(List resourceRules) { this.resourceRules = resourceRules; } public V1beta3PolicyRulesWithSubjects subjects(List subjects) { - this.subjects = subjects; return this; } @@ -152,7 +147,6 @@ public List getSubjects() { return subjects; } - public void setSubjects(List subjects) { this.subjects = subjects; } @@ -217,32 +211,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1beta3PolicyRulesWithSubjects + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1beta3PolicyRulesWithSubjects */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1beta3PolicyRulesWithSubjects.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1beta3PolicyRulesWithSubjects.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1beta3PolicyRulesWithSubjects is not found in the empty JSON string", V1beta3PolicyRulesWithSubjects.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1beta3PolicyRulesWithSubjects.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta3PolicyRulesWithSubjects` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta3PolicyRulesWithSubjects` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1beta3PolicyRulesWithSubjects.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (jsonObj.get("nonResourceRules") != null && !jsonObj.get("nonResourceRules").isJsonNull()) { JsonArray jsonArraynonResourceRules = jsonObj.getAsJsonArray("nonResourceRules"); if (jsonArraynonResourceRules != null) { @@ -253,7 +248,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `nonResourceRules` (array) for (int i = 0; i < jsonArraynonResourceRules.size(); i++) { - V1beta3NonResourcePolicyRule.validateJsonObject(jsonArraynonResourceRules.get(i).getAsJsonObject()); + V1beta3NonResourcePolicyRule.validateJsonElement(jsonArraynonResourceRules.get(i)); }; } } @@ -267,7 +262,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `resourceRules` (array) for (int i = 0; i < jsonArrayresourceRules.size(); i++) { - V1beta3ResourcePolicyRule.validateJsonObject(jsonArrayresourceRules.get(i).getAsJsonObject()); + V1beta3ResourcePolicyRule.validateJsonElement(jsonArrayresourceRules.get(i)); }; } } @@ -279,7 +274,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArraysubjects = jsonObj.getAsJsonArray("subjects"); // validate the required field `subjects` (array) for (int i = 0; i < jsonArraysubjects.size(); i++) { - V1beta3Subject.validateJsonObject(jsonArraysubjects.get(i).getAsJsonObject()); + V1beta3Subject.validateJsonElement(jsonArraysubjects.get(i)); }; } @@ -303,9 +298,9 @@ public void write(JsonWriter out, V1beta3PolicyRulesWithSubjects value) throws I @Override public V1beta3PolicyRulesWithSubjects read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -332,3 +327,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfiguration.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfiguration.java index 906bfcc8de..afb69aaceb 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfiguration.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfiguration.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1beta3PriorityLevelConfigurationSpec; import io.kubernetes.client.openapi.models.V1beta3PriorityLevelConfigurationStatus; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * PriorityLevelConfiguration represents the configuration of a priority level. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1beta3PriorityLevelConfiguration implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -78,7 +78,6 @@ public V1beta3PriorityLevelConfiguration() { } public V1beta3PriorityLevelConfiguration apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -92,14 +91,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1beta3PriorityLevelConfiguration kind(String kind) { - this.kind = kind; return this; } @@ -113,14 +110,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1beta3PriorityLevelConfiguration metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -134,14 +129,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V1beta3PriorityLevelConfiguration spec(V1beta3PriorityLevelConfigurationSpec spec) { - this.spec = spec; return this; } @@ -155,14 +148,12 @@ public V1beta3PriorityLevelConfigurationSpec getSpec() { return spec; } - public void setSpec(V1beta3PriorityLevelConfigurationSpec spec) { this.spec = spec; } public V1beta3PriorityLevelConfiguration status(V1beta3PriorityLevelConfigurationStatus status) { - this.status = status; return this; } @@ -176,7 +167,6 @@ public V1beta3PriorityLevelConfigurationStatus getStatus() { return status; } - public void setStatus(V1beta3PriorityLevelConfigurationStatus status) { this.status = status; } @@ -246,25 +236,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1beta3PriorityLevelConfiguration + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1beta3PriorityLevelConfiguration */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1beta3PriorityLevelConfiguration.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1beta3PriorityLevelConfiguration.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1beta3PriorityLevelConfiguration is not found in the empty JSON string", V1beta3PriorityLevelConfiguration.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1beta3PriorityLevelConfiguration.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta3PriorityLevelConfiguration` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta3PriorityLevelConfiguration` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -273,15 +264,15 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } // validate the optional field `spec` if (jsonObj.get("spec") != null && !jsonObj.get("spec").isJsonNull()) { - V1beta3PriorityLevelConfigurationSpec.validateJsonObject(jsonObj.getAsJsonObject("spec")); + V1beta3PriorityLevelConfigurationSpec.validateJsonElement(jsonObj.get("spec")); } // validate the optional field `status` if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { - V1beta3PriorityLevelConfigurationStatus.validateJsonObject(jsonObj.getAsJsonObject("status")); + V1beta3PriorityLevelConfigurationStatus.validateJsonElement(jsonObj.get("status")); } } @@ -305,9 +296,9 @@ public void write(JsonWriter out, V1beta3PriorityLevelConfiguration value) throw @Override public V1beta3PriorityLevelConfiguration read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -334,3 +325,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationCondition.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationCondition.java index c2a362937d..b2a109ad0a 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationCondition.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationCondition.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * PriorityLevelConfigurationCondition defines the condition of priority level. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1beta3PriorityLevelConfigurationCondition { public static final String SERIALIZED_NAME_LAST_TRANSITION_TIME = "lastTransitionTime"; @SerializedName(SERIALIZED_NAME_LAST_TRANSITION_TIME) @@ -76,7 +76,6 @@ public V1beta3PriorityLevelConfigurationCondition() { } public V1beta3PriorityLevelConfigurationCondition lastTransitionTime(OffsetDateTime lastTransitionTime) { - this.lastTransitionTime = lastTransitionTime; return this; } @@ -90,14 +89,12 @@ public OffsetDateTime getLastTransitionTime() { return lastTransitionTime; } - public void setLastTransitionTime(OffsetDateTime lastTransitionTime) { this.lastTransitionTime = lastTransitionTime; } public V1beta3PriorityLevelConfigurationCondition message(String message) { - this.message = message; return this; } @@ -111,14 +108,12 @@ public String getMessage() { return message; } - public void setMessage(String message) { this.message = message; } public V1beta3PriorityLevelConfigurationCondition reason(String reason) { - this.reason = reason; return this; } @@ -132,14 +127,12 @@ public String getReason() { return reason; } - public void setReason(String reason) { this.reason = reason; } public V1beta3PriorityLevelConfigurationCondition status(String status) { - this.status = status; return this; } @@ -153,14 +146,12 @@ public String getStatus() { return status; } - public void setStatus(String status) { this.status = status; } public V1beta3PriorityLevelConfigurationCondition type(String type) { - this.type = type; return this; } @@ -174,7 +165,6 @@ public String getType() { return type; } - public void setType(String type) { this.type = type; } @@ -244,25 +234,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1beta3PriorityLevelConfigurationCondition + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1beta3PriorityLevelConfigurationCondition */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1beta3PriorityLevelConfigurationCondition.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1beta3PriorityLevelConfigurationCondition.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1beta3PriorityLevelConfigurationCondition is not found in the empty JSON string", V1beta3PriorityLevelConfigurationCondition.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1beta3PriorityLevelConfigurationCondition.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta3PriorityLevelConfigurationCondition` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta3PriorityLevelConfigurationCondition` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); } @@ -297,9 +288,9 @@ public void write(JsonWriter out, V1beta3PriorityLevelConfigurationCondition val @Override public V1beta3PriorityLevelConfigurationCondition read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -326,3 +317,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationList.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationList.java index 79e555fdff..4da6833b77 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationList.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationList.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1beta3PriorityLevelConfiguration; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * PriorityLevelConfigurationList is a list of PriorityLevelConfiguration objects. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1beta3PriorityLevelConfigurationList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -75,7 +75,6 @@ public V1beta3PriorityLevelConfigurationList() { } public V1beta3PriorityLevelConfigurationList apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -89,14 +88,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V1beta3PriorityLevelConfigurationList items(List items) { - this.items = items; return this; } @@ -118,14 +115,12 @@ public List getItems() { return items; } - public void setItems(List items) { this.items = items; } public V1beta3PriorityLevelConfigurationList kind(String kind) { - this.kind = kind; return this; } @@ -139,14 +134,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1beta3PriorityLevelConfigurationList metadata(V1ListMeta metadata) { - this.metadata = metadata; return this; } @@ -160,7 +153,6 @@ public V1ListMeta getMetadata() { return metadata; } - public void setMetadata(V1ListMeta metadata) { this.metadata = metadata; } @@ -228,32 +220,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1beta3PriorityLevelConfigurationList + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1beta3PriorityLevelConfigurationList */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1beta3PriorityLevelConfigurationList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1beta3PriorityLevelConfigurationList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1beta3PriorityLevelConfigurationList is not found in the empty JSON string", V1beta3PriorityLevelConfigurationList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1beta3PriorityLevelConfigurationList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta3PriorityLevelConfigurationList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta3PriorityLevelConfigurationList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1beta3PriorityLevelConfigurationList.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -265,14 +258,14 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); // validate the required field `items` (array) for (int i = 0; i < jsonArrayitems.size(); i++) { - V1beta3PriorityLevelConfiguration.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject()); + V1beta3PriorityLevelConfiguration.validateJsonElement(jsonArrayitems.get(i)); }; if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ListMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ListMeta.validateJsonElement(jsonObj.get("metadata")); } } @@ -296,9 +289,9 @@ public void write(JsonWriter out, V1beta3PriorityLevelConfigurationList value) t @Override public V1beta3PriorityLevelConfigurationList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -325,3 +318,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationReference.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationReference.java index 6bd29a02c8..2bd8e0f702 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationReference.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationReference.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * PriorityLevelConfigurationReference contains information that points to the \"request-priority\" being used. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1beta3PriorityLevelConfigurationReference { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) @@ -59,7 +59,6 @@ public V1beta3PriorityLevelConfigurationReference() { } public V1beta3PriorityLevelConfigurationReference name(String name) { - this.name = name; return this; } @@ -73,7 +72,6 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } @@ -132,32 +130,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1beta3PriorityLevelConfigurationReference + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1beta3PriorityLevelConfigurationReference */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1beta3PriorityLevelConfigurationReference.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1beta3PriorityLevelConfigurationReference.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1beta3PriorityLevelConfigurationReference is not found in the empty JSON string", V1beta3PriorityLevelConfigurationReference.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1beta3PriorityLevelConfigurationReference.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta3PriorityLevelConfigurationReference` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta3PriorityLevelConfigurationReference` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1beta3PriorityLevelConfigurationReference.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } @@ -183,9 +182,9 @@ public void write(JsonWriter out, V1beta3PriorityLevelConfigurationReference val @Override public V1beta3PriorityLevelConfigurationReference read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -212,3 +211,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationSpec.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationSpec.java index 96218d172c..69f9688d1a 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationSpec.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationSpec.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1beta3ExemptPriorityLevelConfiguration; import io.kubernetes.client.openapi.models.V1beta3LimitedPriorityLevelConfiguration; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -43,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -51,7 +51,7 @@ /** * PriorityLevelConfigurationSpec specifies the configuration of a priority level. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1beta3PriorityLevelConfigurationSpec { public static final String SERIALIZED_NAME_EXEMPT = "exempt"; @SerializedName(SERIALIZED_NAME_EXEMPT) @@ -69,7 +69,6 @@ public V1beta3PriorityLevelConfigurationSpec() { } public V1beta3PriorityLevelConfigurationSpec exempt(V1beta3ExemptPriorityLevelConfiguration exempt) { - this.exempt = exempt; return this; } @@ -83,14 +82,12 @@ public V1beta3ExemptPriorityLevelConfiguration getExempt() { return exempt; } - public void setExempt(V1beta3ExemptPriorityLevelConfiguration exempt) { this.exempt = exempt; } public V1beta3PriorityLevelConfigurationSpec limited(V1beta3LimitedPriorityLevelConfiguration limited) { - this.limited = limited; return this; } @@ -104,14 +101,12 @@ public V1beta3LimitedPriorityLevelConfiguration getLimited() { return limited; } - public void setLimited(V1beta3LimitedPriorityLevelConfiguration limited) { this.limited = limited; } public V1beta3PriorityLevelConfigurationSpec type(String type) { - this.type = type; return this; } @@ -125,7 +120,6 @@ public String getType() { return type; } - public void setType(String type) { this.type = type; } @@ -190,39 +184,40 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1beta3PriorityLevelConfigurationSpec + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1beta3PriorityLevelConfigurationSpec */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1beta3PriorityLevelConfigurationSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1beta3PriorityLevelConfigurationSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1beta3PriorityLevelConfigurationSpec is not found in the empty JSON string", V1beta3PriorityLevelConfigurationSpec.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1beta3PriorityLevelConfigurationSpec.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta3PriorityLevelConfigurationSpec` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta3PriorityLevelConfigurationSpec` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1beta3PriorityLevelConfigurationSpec.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `exempt` if (jsonObj.get("exempt") != null && !jsonObj.get("exempt").isJsonNull()) { - V1beta3ExemptPriorityLevelConfiguration.validateJsonObject(jsonObj.getAsJsonObject("exempt")); + V1beta3ExemptPriorityLevelConfiguration.validateJsonElement(jsonObj.get("exempt")); } // validate the optional field `limited` if (jsonObj.get("limited") != null && !jsonObj.get("limited").isJsonNull()) { - V1beta3LimitedPriorityLevelConfiguration.validateJsonObject(jsonObj.getAsJsonObject("limited")); + V1beta3LimitedPriorityLevelConfiguration.validateJsonElement(jsonObj.get("limited")); } if (!jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); @@ -249,9 +244,9 @@ public void write(JsonWriter out, V1beta3PriorityLevelConfigurationSpec value) t @Override public V1beta3PriorityLevelConfigurationSpec read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -278,3 +273,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationStatus.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationStatus.java index ed7bd5c701..9b8a4f0cc3 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationStatus.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationStatus.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V1beta3PriorityLevelConfigurationCondition; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,17 +52,16 @@ /** * PriorityLevelConfigurationStatus represents the current state of a \"request-priority\". */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1beta3PriorityLevelConfigurationStatus { public static final String SERIALIZED_NAME_CONDITIONS = "conditions"; @SerializedName(SERIALIZED_NAME_CONDITIONS) - private List conditions; + private List conditions = new ArrayList<>(); public V1beta3PriorityLevelConfigurationStatus() { } public V1beta3PriorityLevelConfigurationStatus conditions(List conditions) { - this.conditions = conditions; return this; } @@ -84,7 +83,6 @@ public List getConditions() { return conditions; } - public void setConditions(List conditions) { this.conditions = conditions; } @@ -142,25 +140,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1beta3PriorityLevelConfigurationStatus + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1beta3PriorityLevelConfigurationStatus */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1beta3PriorityLevelConfigurationStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1beta3PriorityLevelConfigurationStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1beta3PriorityLevelConfigurationStatus is not found in the empty JSON string", V1beta3PriorityLevelConfigurationStatus.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1beta3PriorityLevelConfigurationStatus.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta3PriorityLevelConfigurationStatus` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta3PriorityLevelConfigurationStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (jsonObj.get("conditions") != null && !jsonObj.get("conditions").isJsonNull()) { JsonArray jsonArrayconditions = jsonObj.getAsJsonArray("conditions"); if (jsonArrayconditions != null) { @@ -171,7 +170,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `conditions` (array) for (int i = 0; i < jsonArrayconditions.size(); i++) { - V1beta3PriorityLevelConfigurationCondition.validateJsonObject(jsonArrayconditions.get(i).getAsJsonObject()); + V1beta3PriorityLevelConfigurationCondition.validateJsonElement(jsonArrayconditions.get(i)); }; } } @@ -197,9 +196,9 @@ public void write(JsonWriter out, V1beta3PriorityLevelConfigurationStatus value) @Override public V1beta3PriorityLevelConfigurationStatus read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -226,3 +225,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3QueuingConfiguration.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3QueuingConfiguration.java index 04b498c12f..19ad8a36c3 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3QueuingConfiguration.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3QueuingConfiguration.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * QueuingConfiguration holds the configuration parameters for queuing */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1beta3QueuingConfiguration { public static final String SERIALIZED_NAME_HAND_SIZE = "handSize"; @SerializedName(SERIALIZED_NAME_HAND_SIZE) @@ -67,7 +67,6 @@ public V1beta3QueuingConfiguration() { } public V1beta3QueuingConfiguration handSize(Integer handSize) { - this.handSize = handSize; return this; } @@ -81,14 +80,12 @@ public Integer getHandSize() { return handSize; } - public void setHandSize(Integer handSize) { this.handSize = handSize; } public V1beta3QueuingConfiguration queueLengthLimit(Integer queueLengthLimit) { - this.queueLengthLimit = queueLengthLimit; return this; } @@ -102,14 +99,12 @@ public Integer getQueueLengthLimit() { return queueLengthLimit; } - public void setQueueLengthLimit(Integer queueLengthLimit) { this.queueLengthLimit = queueLengthLimit; } public V1beta3QueuingConfiguration queues(Integer queues) { - this.queues = queues; return this; } @@ -123,7 +118,6 @@ public Integer getQueues() { return queues; } - public void setQueues(Integer queues) { this.queues = queues; } @@ -187,25 +181,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1beta3QueuingConfiguration + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1beta3QueuingConfiguration */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1beta3QueuingConfiguration.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1beta3QueuingConfiguration.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1beta3QueuingConfiguration is not found in the empty JSON string", V1beta3QueuingConfiguration.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1beta3QueuingConfiguration.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta3QueuingConfiguration` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta3QueuingConfiguration` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -228,9 +223,9 @@ public void write(JsonWriter out, V1beta3QueuingConfiguration value) throws IOEx @Override public V1beta3QueuingConfiguration read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -257,3 +252,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3ResourcePolicyRule.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3ResourcePolicyRule.java index 4523ac9f66..e92bfb02b2 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3ResourcePolicyRule.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3ResourcePolicyRule.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -43,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -51,7 +51,7 @@ /** * ResourcePolicyRule is a predicate that matches some resource requests, testing the request's verb and the target resource. A ResourcePolicyRule matches a resource request if and only if: (a) at least one member of verbs matches the request, (b) at least one member of apiGroups matches the request, (c) at least one member of resources matches the request, and (d) either (d1) the request does not specify a namespace (i.e., `Namespace==\"\"`) and clusterScope is true or (d2) the request specifies a namespace and least one member of namespaces matches the request's namespace. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1beta3ResourcePolicyRule { public static final String SERIALIZED_NAME_API_GROUPS = "apiGroups"; @SerializedName(SERIALIZED_NAME_API_GROUPS) @@ -63,7 +63,7 @@ public class V1beta3ResourcePolicyRule { public static final String SERIALIZED_NAME_NAMESPACES = "namespaces"; @SerializedName(SERIALIZED_NAME_NAMESPACES) - private List namespaces; + private List namespaces = new ArrayList<>(); public static final String SERIALIZED_NAME_RESOURCES = "resources"; @SerializedName(SERIALIZED_NAME_RESOURCES) @@ -77,7 +77,6 @@ public V1beta3ResourcePolicyRule() { } public V1beta3ResourcePolicyRule apiGroups(List apiGroups) { - this.apiGroups = apiGroups; return this; } @@ -99,14 +98,12 @@ public List getApiGroups() { return apiGroups; } - public void setApiGroups(List apiGroups) { this.apiGroups = apiGroups; } public V1beta3ResourcePolicyRule clusterScope(Boolean clusterScope) { - this.clusterScope = clusterScope; return this; } @@ -120,14 +117,12 @@ public Boolean getClusterScope() { return clusterScope; } - public void setClusterScope(Boolean clusterScope) { this.clusterScope = clusterScope; } public V1beta3ResourcePolicyRule namespaces(List namespaces) { - this.namespaces = namespaces; return this; } @@ -149,14 +144,12 @@ public List getNamespaces() { return namespaces; } - public void setNamespaces(List namespaces) { this.namespaces = namespaces; } public V1beta3ResourcePolicyRule resources(List resources) { - this.resources = resources; return this; } @@ -178,14 +171,12 @@ public List getResources() { return resources; } - public void setResources(List resources) { this.resources = resources; } public V1beta3ResourcePolicyRule verbs(List verbs) { - this.verbs = verbs; return this; } @@ -207,7 +198,6 @@ public List getVerbs() { return verbs; } - public void setVerbs(List verbs) { this.verbs = verbs; } @@ -280,32 +270,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1beta3ResourcePolicyRule + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1beta3ResourcePolicyRule */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1beta3ResourcePolicyRule.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1beta3ResourcePolicyRule.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1beta3ResourcePolicyRule is not found in the empty JSON string", V1beta3ResourcePolicyRule.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1beta3ResourcePolicyRule.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta3ResourcePolicyRule` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta3ResourcePolicyRule` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1beta3ResourcePolicyRule.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the required json array is present if (jsonObj.get("apiGroups") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); @@ -313,7 +304,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("Expected the field `apiGroups` to be an array in the JSON string but got `%s`", jsonObj.get("apiGroups").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("namespaces") != null && !jsonObj.get("namespaces").isJsonArray()) { + if (jsonObj.get("namespaces") != null && !jsonObj.get("namespaces").isJsonNull() && !jsonObj.get("namespaces").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `namespaces` to be an array in the JSON string but got `%s`", jsonObj.get("namespaces").toString())); } // ensure the required json array is present @@ -350,9 +341,9 @@ public void write(JsonWriter out, V1beta3ResourcePolicyRule value) throws IOExce @Override public V1beta3ResourcePolicyRule read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -379,3 +370,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3ServiceAccountSubject.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3ServiceAccountSubject.java index 9fdb6e9d93..b53dec3eea 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3ServiceAccountSubject.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3ServiceAccountSubject.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * ServiceAccountSubject holds detailed information for service-account-kind subject. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1beta3ServiceAccountSubject { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) @@ -63,7 +63,6 @@ public V1beta3ServiceAccountSubject() { } public V1beta3ServiceAccountSubject name(String name) { - this.name = name; return this; } @@ -77,14 +76,12 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } public V1beta3ServiceAccountSubject namespace(String namespace) { - this.namespace = namespace; return this; } @@ -98,7 +95,6 @@ public String getNamespace() { return namespace; } - public void setNamespace(String namespace) { this.namespace = namespace; } @@ -161,32 +157,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1beta3ServiceAccountSubject + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1beta3ServiceAccountSubject */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1beta3ServiceAccountSubject.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1beta3ServiceAccountSubject.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1beta3ServiceAccountSubject is not found in the empty JSON string", V1beta3ServiceAccountSubject.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1beta3ServiceAccountSubject.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta3ServiceAccountSubject` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta3ServiceAccountSubject` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1beta3ServiceAccountSubject.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } @@ -215,9 +212,9 @@ public void write(JsonWriter out, V1beta3ServiceAccountSubject value) throws IOE @Override public V1beta3ServiceAccountSubject read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -244,3 +241,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3Subject.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3Subject.java index fcb9e03aa7..aaad8b3691 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3Subject.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3Subject.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V1beta3ServiceAccountSubject; import io.kubernetes.client.openapi.models.V1beta3UserSubject; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * Subject matches the originator of a request, as identified by the request authentication system. There are three ways of matching an originator; by user, group, or service account. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1beta3Subject { public static final String SERIALIZED_NAME_GROUP = "group"; @SerializedName(SERIALIZED_NAME_GROUP) @@ -74,7 +74,6 @@ public V1beta3Subject() { } public V1beta3Subject group(V1beta3GroupSubject group) { - this.group = group; return this; } @@ -88,14 +87,12 @@ public V1beta3GroupSubject getGroup() { return group; } - public void setGroup(V1beta3GroupSubject group) { this.group = group; } public V1beta3Subject kind(String kind) { - this.kind = kind; return this; } @@ -109,14 +106,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V1beta3Subject serviceAccount(V1beta3ServiceAccountSubject serviceAccount) { - this.serviceAccount = serviceAccount; return this; } @@ -130,14 +125,12 @@ public V1beta3ServiceAccountSubject getServiceAccount() { return serviceAccount; } - public void setServiceAccount(V1beta3ServiceAccountSubject serviceAccount) { this.serviceAccount = serviceAccount; } public V1beta3Subject user(V1beta3UserSubject user) { - this.user = user; return this; } @@ -151,7 +144,6 @@ public V1beta3UserSubject getUser() { return user; } - public void setUser(V1beta3UserSubject user) { this.user = user; } @@ -219,46 +211,47 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1beta3Subject + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1beta3Subject */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1beta3Subject.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1beta3Subject.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1beta3Subject is not found in the empty JSON string", V1beta3Subject.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1beta3Subject.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta3Subject` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta3Subject` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1beta3Subject.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `group` if (jsonObj.get("group") != null && !jsonObj.get("group").isJsonNull()) { - V1beta3GroupSubject.validateJsonObject(jsonObj.getAsJsonObject("group")); + V1beta3GroupSubject.validateJsonElement(jsonObj.get("group")); } if (!jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); } // validate the optional field `serviceAccount` if (jsonObj.get("serviceAccount") != null && !jsonObj.get("serviceAccount").isJsonNull()) { - V1beta3ServiceAccountSubject.validateJsonObject(jsonObj.getAsJsonObject("serviceAccount")); + V1beta3ServiceAccountSubject.validateJsonElement(jsonObj.get("serviceAccount")); } // validate the optional field `user` if (jsonObj.get("user") != null && !jsonObj.get("user").isJsonNull()) { - V1beta3UserSubject.validateJsonObject(jsonObj.getAsJsonObject("user")); + V1beta3UserSubject.validateJsonElement(jsonObj.get("user")); } } @@ -282,9 +275,9 @@ public void write(JsonWriter out, V1beta3Subject value) throws IOException { @Override public V1beta3Subject read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -311,3 +304,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3UserSubject.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3UserSubject.java index 8152466ef3..4ba0c97375 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3UserSubject.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3UserSubject.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * UserSubject holds detailed information for user-kind subject. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V1beta3UserSubject { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) @@ -59,7 +59,6 @@ public V1beta3UserSubject() { } public V1beta3UserSubject name(String name) { - this.name = name; return this; } @@ -73,7 +72,6 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } @@ -132,32 +130,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V1beta3UserSubject + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V1beta3UserSubject */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V1beta3UserSubject.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1beta3UserSubject.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V1beta3UserSubject is not found in the empty JSON string", V1beta3UserSubject.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V1beta3UserSubject.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta3UserSubject` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V1beta3UserSubject` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V1beta3UserSubject.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } @@ -183,9 +182,9 @@ public void write(JsonWriter out, V1beta3UserSubject value) throws IOException { @Override public V1beta3UserSubject read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -212,3 +211,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2ContainerResourceMetricSource.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2ContainerResourceMetricSource.java index 1e90cb3eb8..4e6263e74b 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2ContainerResourceMetricSource.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2ContainerResourceMetricSource.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.openapi.models.V2MetricTarget; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * ContainerResourceMetricSource 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. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V2ContainerResourceMetricSource { public static final String SERIALIZED_NAME_CONTAINER = "container"; @SerializedName(SERIALIZED_NAME_CONTAINER) @@ -68,7 +68,6 @@ public V2ContainerResourceMetricSource() { } public V2ContainerResourceMetricSource container(String container) { - this.container = container; return this; } @@ -82,14 +81,12 @@ public String getContainer() { return container; } - public void setContainer(String container) { this.container = container; } public V2ContainerResourceMetricSource name(String name) { - this.name = name; return this; } @@ -103,14 +100,12 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } public V2ContainerResourceMetricSource target(V2MetricTarget target) { - this.target = target; return this; } @@ -124,7 +119,6 @@ public V2MetricTarget getTarget() { return target; } - public void setTarget(V2MetricTarget target) { this.target = target; } @@ -191,32 +185,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V2ContainerResourceMetricSource + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V2ContainerResourceMetricSource */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V2ContainerResourceMetricSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V2ContainerResourceMetricSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V2ContainerResourceMetricSource is not found in the empty JSON string", V2ContainerResourceMetricSource.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V2ContainerResourceMetricSource.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V2ContainerResourceMetricSource` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V2ContainerResourceMetricSource` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V2ContainerResourceMetricSource.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("container").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `container` to be a primitive type in the JSON string but got `%s`", jsonObj.get("container").toString())); } @@ -224,7 +219,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } // validate the required field `target` - V2MetricTarget.validateJsonObject(jsonObj.getAsJsonObject("target")); + V2MetricTarget.validateJsonElement(jsonObj.get("target")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -247,9 +242,9 @@ public void write(JsonWriter out, V2ContainerResourceMetricSource value) throws @Override public V2ContainerResourceMetricSource read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -276,3 +271,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2ContainerResourceMetricStatus.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2ContainerResourceMetricStatus.java index bc4c301879..1c25f4f103 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2ContainerResourceMetricStatus.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2ContainerResourceMetricStatus.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.openapi.models.V2MetricValueStatus; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * ContainerResourceMetricStatus indicates the current value of a resource metric known to Kubernetes, as specified in requests and limits, describing a single container in 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. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V2ContainerResourceMetricStatus { public static final String SERIALIZED_NAME_CONTAINER = "container"; @SerializedName(SERIALIZED_NAME_CONTAINER) @@ -68,7 +68,6 @@ public V2ContainerResourceMetricStatus() { } public V2ContainerResourceMetricStatus container(String container) { - this.container = container; return this; } @@ -82,14 +81,12 @@ public String getContainer() { return container; } - public void setContainer(String container) { this.container = container; } public V2ContainerResourceMetricStatus current(V2MetricValueStatus current) { - this.current = current; return this; } @@ -103,14 +100,12 @@ public V2MetricValueStatus getCurrent() { return current; } - public void setCurrent(V2MetricValueStatus current) { this.current = current; } public V2ContainerResourceMetricStatus name(String name) { - this.name = name; return this; } @@ -124,7 +119,6 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } @@ -191,37 +185,38 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V2ContainerResourceMetricStatus + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V2ContainerResourceMetricStatus */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V2ContainerResourceMetricStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V2ContainerResourceMetricStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V2ContainerResourceMetricStatus is not found in the empty JSON string", V2ContainerResourceMetricStatus.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V2ContainerResourceMetricStatus.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V2ContainerResourceMetricStatus` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V2ContainerResourceMetricStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V2ContainerResourceMetricStatus.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("container").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `container` to be a primitive type in the JSON string but got `%s`", jsonObj.get("container").toString())); } // validate the required field `current` - V2MetricValueStatus.validateJsonObject(jsonObj.getAsJsonObject("current")); + V2MetricValueStatus.validateJsonElement(jsonObj.get("current")); if (!jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } @@ -247,9 +242,9 @@ public void write(JsonWriter out, V2ContainerResourceMetricStatus value) throws @Override public V2ContainerResourceMetricStatus read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -276,3 +271,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2CrossVersionObjectReference.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2CrossVersionObjectReference.java index d76dab1d76..4257ee3ea8 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2CrossVersionObjectReference.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2CrossVersionObjectReference.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * CrossVersionObjectReference contains enough information to let you identify the referred resource. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V2CrossVersionObjectReference { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -67,7 +67,6 @@ public V2CrossVersionObjectReference() { } public V2CrossVersionObjectReference apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -81,14 +80,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V2CrossVersionObjectReference kind(String kind) { - this.kind = kind; return this; } @@ -102,14 +99,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V2CrossVersionObjectReference name(String name) { - this.name = name; return this; } @@ -123,7 +118,6 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } @@ -189,32 +183,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V2CrossVersionObjectReference + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V2CrossVersionObjectReference */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V2CrossVersionObjectReference.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V2CrossVersionObjectReference.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V2CrossVersionObjectReference is not found in the empty JSON string", V2CrossVersionObjectReference.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V2CrossVersionObjectReference.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V2CrossVersionObjectReference` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V2CrossVersionObjectReference` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V2CrossVersionObjectReference.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -246,9 +241,9 @@ public void write(JsonWriter out, V2CrossVersionObjectReference value) throws IO @Override public V2CrossVersionObjectReference read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -275,3 +270,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2ExternalMetricSource.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2ExternalMetricSource.java index ae7ed2a85c..b4da4a38b8 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2ExternalMetricSource.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2ExternalMetricSource.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V2MetricIdentifier; import io.kubernetes.client.openapi.models.V2MetricTarget; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -43,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -51,7 +51,7 @@ /** * ExternalMetricSource indicates how to scale on a metric not associated with any Kubernetes object (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster). */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V2ExternalMetricSource { public static final String SERIALIZED_NAME_METRIC = "metric"; @SerializedName(SERIALIZED_NAME_METRIC) @@ -65,7 +65,6 @@ public V2ExternalMetricSource() { } public V2ExternalMetricSource metric(V2MetricIdentifier metric) { - this.metric = metric; return this; } @@ -79,14 +78,12 @@ public V2MetricIdentifier getMetric() { return metric; } - public void setMetric(V2MetricIdentifier metric) { this.metric = metric; } public V2ExternalMetricSource target(V2MetricTarget target) { - this.target = target; return this; } @@ -100,7 +97,6 @@ public V2MetricTarget getTarget() { return target; } - public void setTarget(V2MetricTarget target) { this.target = target; } @@ -163,36 +159,37 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V2ExternalMetricSource + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V2ExternalMetricSource */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V2ExternalMetricSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V2ExternalMetricSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V2ExternalMetricSource is not found in the empty JSON string", V2ExternalMetricSource.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V2ExternalMetricSource.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V2ExternalMetricSource` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V2ExternalMetricSource` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V2ExternalMetricSource.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the required field `metric` - V2MetricIdentifier.validateJsonObject(jsonObj.getAsJsonObject("metric")); + V2MetricIdentifier.validateJsonElement(jsonObj.get("metric")); // validate the required field `target` - V2MetricTarget.validateJsonObject(jsonObj.getAsJsonObject("target")); + V2MetricTarget.validateJsonElement(jsonObj.get("target")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -215,9 +212,9 @@ public void write(JsonWriter out, V2ExternalMetricSource value) throws IOExcepti @Override public V2ExternalMetricSource read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -244,3 +241,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2ExternalMetricStatus.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2ExternalMetricStatus.java index d4cdc74430..4f8685f6d2 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2ExternalMetricStatus.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2ExternalMetricStatus.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V2MetricIdentifier; import io.kubernetes.client.openapi.models.V2MetricValueStatus; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -43,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -51,7 +51,7 @@ /** * ExternalMetricStatus indicates the current value of a global metric not associated with any Kubernetes object. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V2ExternalMetricStatus { public static final String SERIALIZED_NAME_CURRENT = "current"; @SerializedName(SERIALIZED_NAME_CURRENT) @@ -65,7 +65,6 @@ public V2ExternalMetricStatus() { } public V2ExternalMetricStatus current(V2MetricValueStatus current) { - this.current = current; return this; } @@ -79,14 +78,12 @@ public V2MetricValueStatus getCurrent() { return current; } - public void setCurrent(V2MetricValueStatus current) { this.current = current; } public V2ExternalMetricStatus metric(V2MetricIdentifier metric) { - this.metric = metric; return this; } @@ -100,7 +97,6 @@ public V2MetricIdentifier getMetric() { return metric; } - public void setMetric(V2MetricIdentifier metric) { this.metric = metric; } @@ -163,36 +159,37 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V2ExternalMetricStatus + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V2ExternalMetricStatus */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V2ExternalMetricStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V2ExternalMetricStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V2ExternalMetricStatus is not found in the empty JSON string", V2ExternalMetricStatus.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V2ExternalMetricStatus.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V2ExternalMetricStatus` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V2ExternalMetricStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V2ExternalMetricStatus.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the required field `current` - V2MetricValueStatus.validateJsonObject(jsonObj.getAsJsonObject("current")); + V2MetricValueStatus.validateJsonElement(jsonObj.get("current")); // validate the required field `metric` - V2MetricIdentifier.validateJsonObject(jsonObj.getAsJsonObject("metric")); + V2MetricIdentifier.validateJsonElement(jsonObj.get("metric")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -215,9 +212,9 @@ public void write(JsonWriter out, V2ExternalMetricStatus value) throws IOExcepti @Override public V2ExternalMetricStatus read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -244,3 +241,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2HPAScalingPolicy.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2HPAScalingPolicy.java index ff91a49297..7d9d96b570 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2HPAScalingPolicy.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2HPAScalingPolicy.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * HPAScalingPolicy is a single policy which must hold true for a specified past interval. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V2HPAScalingPolicy { public static final String SERIALIZED_NAME_PERIOD_SECONDS = "periodSeconds"; @SerializedName(SERIALIZED_NAME_PERIOD_SECONDS) @@ -67,7 +67,6 @@ public V2HPAScalingPolicy() { } public V2HPAScalingPolicy periodSeconds(Integer periodSeconds) { - this.periodSeconds = periodSeconds; return this; } @@ -81,14 +80,12 @@ public Integer getPeriodSeconds() { return periodSeconds; } - public void setPeriodSeconds(Integer periodSeconds) { this.periodSeconds = periodSeconds; } public V2HPAScalingPolicy type(String type) { - this.type = type; return this; } @@ -102,14 +99,12 @@ public String getType() { return type; } - public void setType(String type) { this.type = type; } public V2HPAScalingPolicy value(Integer value) { - this.value = value; return this; } @@ -123,7 +118,6 @@ public Integer getValue() { return value; } - public void setValue(Integer value) { this.value = value; } @@ -190,32 +184,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V2HPAScalingPolicy + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V2HPAScalingPolicy */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V2HPAScalingPolicy.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V2HPAScalingPolicy.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V2HPAScalingPolicy is not found in the empty JSON string", V2HPAScalingPolicy.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V2HPAScalingPolicy.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V2HPAScalingPolicy` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V2HPAScalingPolicy` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V2HPAScalingPolicy.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } @@ -241,9 +236,9 @@ public void write(JsonWriter out, V2HPAScalingPolicy value) throws IOException { @Override public V2HPAScalingPolicy read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -270,3 +265,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2HPAScalingRules.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2HPAScalingRules.java index cdd940f1a0..74dfdbfaeb 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2HPAScalingRules.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2HPAScalingRules.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V2HPAScalingPolicy; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,11 +52,11 @@ /** * HPAScalingRules configures the scaling behavior for one direction. These Rules are applied after calculating DesiredReplicas from metrics for the HPA. They can limit the scaling velocity by specifying scaling policies. They can prevent flapping by specifying the stabilization window, so that the number of replicas is not set instantly, instead, the safest value from the stabilization window is chosen. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V2HPAScalingRules { public static final String SERIALIZED_NAME_POLICIES = "policies"; @SerializedName(SERIALIZED_NAME_POLICIES) - private List policies; + private List policies = new ArrayList<>(); public static final String SERIALIZED_NAME_SELECT_POLICY = "selectPolicy"; @SerializedName(SERIALIZED_NAME_SELECT_POLICY) @@ -70,7 +70,6 @@ public V2HPAScalingRules() { } public V2HPAScalingRules policies(List policies) { - this.policies = policies; return this; } @@ -92,14 +91,12 @@ public List getPolicies() { return policies; } - public void setPolicies(List policies) { this.policies = policies; } public V2HPAScalingRules selectPolicy(String selectPolicy) { - this.selectPolicy = selectPolicy; return this; } @@ -113,14 +110,12 @@ public String getSelectPolicy() { return selectPolicy; } - public void setSelectPolicy(String selectPolicy) { this.selectPolicy = selectPolicy; } public V2HPAScalingRules stabilizationWindowSeconds(Integer stabilizationWindowSeconds) { - this.stabilizationWindowSeconds = stabilizationWindowSeconds; return this; } @@ -134,7 +129,6 @@ public Integer getStabilizationWindowSeconds() { return stabilizationWindowSeconds; } - public void setStabilizationWindowSeconds(Integer stabilizationWindowSeconds) { this.stabilizationWindowSeconds = stabilizationWindowSeconds; } @@ -198,25 +192,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V2HPAScalingRules + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V2HPAScalingRules */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V2HPAScalingRules.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V2HPAScalingRules.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V2HPAScalingRules is not found in the empty JSON string", V2HPAScalingRules.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V2HPAScalingRules.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V2HPAScalingRules` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V2HPAScalingRules` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (jsonObj.get("policies") != null && !jsonObj.get("policies").isJsonNull()) { JsonArray jsonArraypolicies = jsonObj.getAsJsonArray("policies"); if (jsonArraypolicies != null) { @@ -227,7 +222,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `policies` (array) for (int i = 0; i < jsonArraypolicies.size(); i++) { - V2HPAScalingPolicy.validateJsonObject(jsonArraypolicies.get(i).getAsJsonObject()); + V2HPAScalingPolicy.validateJsonElement(jsonArraypolicies.get(i)); }; } } @@ -256,9 +251,9 @@ public void write(JsonWriter out, V2HPAScalingRules value) throws IOException { @Override public V2HPAScalingRules read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -285,3 +280,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscaler.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscaler.java index 93189fb503..0f6be2a32d 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscaler.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscaler.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V2HorizontalPodAutoscalerSpec; import io.kubernetes.client.openapi.models.V2HorizontalPodAutoscalerStatus; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * 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. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V2HorizontalPodAutoscaler implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -78,7 +78,6 @@ public V2HorizontalPodAutoscaler() { } public V2HorizontalPodAutoscaler apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -92,14 +91,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V2HorizontalPodAutoscaler kind(String kind) { - this.kind = kind; return this; } @@ -113,14 +110,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V2HorizontalPodAutoscaler metadata(V1ObjectMeta metadata) { - this.metadata = metadata; return this; } @@ -134,14 +129,12 @@ public V1ObjectMeta getMetadata() { return metadata; } - public void setMetadata(V1ObjectMeta metadata) { this.metadata = metadata; } public V2HorizontalPodAutoscaler spec(V2HorizontalPodAutoscalerSpec spec) { - this.spec = spec; return this; } @@ -155,14 +148,12 @@ public V2HorizontalPodAutoscalerSpec getSpec() { return spec; } - public void setSpec(V2HorizontalPodAutoscalerSpec spec) { this.spec = spec; } public V2HorizontalPodAutoscaler status(V2HorizontalPodAutoscalerStatus status) { - this.status = status; return this; } @@ -176,7 +167,6 @@ public V2HorizontalPodAutoscalerStatus getStatus() { return status; } - public void setStatus(V2HorizontalPodAutoscalerStatus status) { this.status = status; } @@ -246,25 +236,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V2HorizontalPodAutoscaler + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V2HorizontalPodAutoscaler */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V2HorizontalPodAutoscaler.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V2HorizontalPodAutoscaler.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V2HorizontalPodAutoscaler is not found in the empty JSON string", V2HorizontalPodAutoscaler.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V2HorizontalPodAutoscaler.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V2HorizontalPodAutoscaler` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V2HorizontalPodAutoscaler` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -273,15 +264,15 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ObjectMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ObjectMeta.validateJsonElement(jsonObj.get("metadata")); } // validate the optional field `spec` if (jsonObj.get("spec") != null && !jsonObj.get("spec").isJsonNull()) { - V2HorizontalPodAutoscalerSpec.validateJsonObject(jsonObj.getAsJsonObject("spec")); + V2HorizontalPodAutoscalerSpec.validateJsonElement(jsonObj.get("spec")); } // validate the optional field `status` if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { - V2HorizontalPodAutoscalerStatus.validateJsonObject(jsonObj.getAsJsonObject("status")); + V2HorizontalPodAutoscalerStatus.validateJsonElement(jsonObj.get("status")); } } @@ -305,9 +296,9 @@ public void write(JsonWriter out, V2HorizontalPodAutoscaler value) throws IOExce @Override public V2HorizontalPodAutoscaler read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -334,3 +325,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerBehavior.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerBehavior.java index 4e59b903bf..6b333eb3b4 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerBehavior.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerBehavior.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.openapi.models.V2HPAScalingRules; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * HorizontalPodAutoscalerBehavior configures the scaling behavior of the target in both Up and Down directions (scaleUp and scaleDown fields respectively). */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V2HorizontalPodAutoscalerBehavior { public static final String SERIALIZED_NAME_SCALE_DOWN = "scaleDown"; @SerializedName(SERIALIZED_NAME_SCALE_DOWN) @@ -64,7 +64,6 @@ public V2HorizontalPodAutoscalerBehavior() { } public V2HorizontalPodAutoscalerBehavior scaleDown(V2HPAScalingRules scaleDown) { - this.scaleDown = scaleDown; return this; } @@ -78,14 +77,12 @@ public V2HPAScalingRules getScaleDown() { return scaleDown; } - public void setScaleDown(V2HPAScalingRules scaleDown) { this.scaleDown = scaleDown; } public V2HorizontalPodAutoscalerBehavior scaleUp(V2HPAScalingRules scaleUp) { - this.scaleUp = scaleUp; return this; } @@ -99,7 +96,6 @@ public V2HPAScalingRules getScaleUp() { return scaleUp; } - public void setScaleUp(V2HPAScalingRules scaleUp) { this.scaleUp = scaleUp; } @@ -160,32 +156,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V2HorizontalPodAutoscalerBehavior + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V2HorizontalPodAutoscalerBehavior */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V2HorizontalPodAutoscalerBehavior.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V2HorizontalPodAutoscalerBehavior.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V2HorizontalPodAutoscalerBehavior is not found in the empty JSON string", V2HorizontalPodAutoscalerBehavior.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V2HorizontalPodAutoscalerBehavior.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V2HorizontalPodAutoscalerBehavior` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V2HorizontalPodAutoscalerBehavior` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `scaleDown` if (jsonObj.get("scaleDown") != null && !jsonObj.get("scaleDown").isJsonNull()) { - V2HPAScalingRules.validateJsonObject(jsonObj.getAsJsonObject("scaleDown")); + V2HPAScalingRules.validateJsonElement(jsonObj.get("scaleDown")); } // validate the optional field `scaleUp` if (jsonObj.get("scaleUp") != null && !jsonObj.get("scaleUp").isJsonNull()) { - V2HPAScalingRules.validateJsonObject(jsonObj.getAsJsonObject("scaleUp")); + V2HPAScalingRules.validateJsonElement(jsonObj.get("scaleUp")); } } @@ -209,9 +206,9 @@ public void write(JsonWriter out, V2HorizontalPodAutoscalerBehavior value) throw @Override public V2HorizontalPodAutoscalerBehavior read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -238,3 +235,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerCondition.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerCondition.java index 9756c88a44..1c71dbd93e 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerCondition.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerCondition.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * HorizontalPodAutoscalerCondition describes the state of a HorizontalPodAutoscaler at a certain point. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V2HorizontalPodAutoscalerCondition { public static final String SERIALIZED_NAME_LAST_TRANSITION_TIME = "lastTransitionTime"; @SerializedName(SERIALIZED_NAME_LAST_TRANSITION_TIME) @@ -76,7 +76,6 @@ public V2HorizontalPodAutoscalerCondition() { } public V2HorizontalPodAutoscalerCondition lastTransitionTime(OffsetDateTime lastTransitionTime) { - this.lastTransitionTime = lastTransitionTime; return this; } @@ -90,14 +89,12 @@ public OffsetDateTime getLastTransitionTime() { return lastTransitionTime; } - public void setLastTransitionTime(OffsetDateTime lastTransitionTime) { this.lastTransitionTime = lastTransitionTime; } public V2HorizontalPodAutoscalerCondition message(String message) { - this.message = message; return this; } @@ -111,14 +108,12 @@ public String getMessage() { return message; } - public void setMessage(String message) { this.message = message; } public V2HorizontalPodAutoscalerCondition reason(String reason) { - this.reason = reason; return this; } @@ -132,14 +127,12 @@ public String getReason() { return reason; } - public void setReason(String reason) { this.reason = reason; } public V2HorizontalPodAutoscalerCondition status(String status) { - this.status = status; return this; } @@ -153,14 +146,12 @@ public String getStatus() { return status; } - public void setStatus(String status) { this.status = status; } public V2HorizontalPodAutoscalerCondition type(String type) { - this.type = type; return this; } @@ -174,7 +165,6 @@ public String getType() { return type; } - public void setType(String type) { this.type = type; } @@ -246,32 +236,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V2HorizontalPodAutoscalerCondition + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V2HorizontalPodAutoscalerCondition */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V2HorizontalPodAutoscalerCondition.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V2HorizontalPodAutoscalerCondition.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V2HorizontalPodAutoscalerCondition is not found in the empty JSON string", V2HorizontalPodAutoscalerCondition.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V2HorizontalPodAutoscalerCondition.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V2HorizontalPodAutoscalerCondition` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V2HorizontalPodAutoscalerCondition` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V2HorizontalPodAutoscalerCondition.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); } @@ -306,9 +297,9 @@ public void write(JsonWriter out, V2HorizontalPodAutoscalerCondition value) thro @Override public V2HorizontalPodAutoscalerCondition read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -335,3 +326,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerList.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerList.java index edfa63147e..e739b67af4 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerList.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerList.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V2HorizontalPodAutoscaler; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -45,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -53,7 +53,7 @@ /** * HorizontalPodAutoscalerList is a list of horizontal pod autoscaler objects. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V2HorizontalPodAutoscalerList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -75,7 +75,6 @@ public V2HorizontalPodAutoscalerList() { } public V2HorizontalPodAutoscalerList apiVersion(String apiVersion) { - this.apiVersion = apiVersion; return this; } @@ -89,14 +88,12 @@ public String getApiVersion() { return apiVersion; } - public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public V2HorizontalPodAutoscalerList items(List items) { - this.items = items; return this; } @@ -118,14 +115,12 @@ public List getItems() { return items; } - public void setItems(List items) { this.items = items; } public V2HorizontalPodAutoscalerList kind(String kind) { - this.kind = kind; return this; } @@ -139,14 +134,12 @@ public String getKind() { return kind; } - public void setKind(String kind) { this.kind = kind; } public V2HorizontalPodAutoscalerList metadata(V1ListMeta metadata) { - this.metadata = metadata; return this; } @@ -160,7 +153,6 @@ public V1ListMeta getMetadata() { return metadata; } - public void setMetadata(V1ListMeta metadata) { this.metadata = metadata; } @@ -228,32 +220,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V2HorizontalPodAutoscalerList + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V2HorizontalPodAutoscalerList */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V2HorizontalPodAutoscalerList.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V2HorizontalPodAutoscalerList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V2HorizontalPodAutoscalerList is not found in the empty JSON string", V2HorizontalPodAutoscalerList.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V2HorizontalPodAutoscalerList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V2HorizontalPodAutoscalerList` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V2HorizontalPodAutoscalerList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V2HorizontalPodAutoscalerList.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("apiVersion") != null && !jsonObj.get("apiVersion").isJsonNull()) && !jsonObj.get("apiVersion").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `apiVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiVersion").toString())); } @@ -265,14 +258,14 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); // validate the required field `items` (array) for (int i = 0; i < jsonArrayitems.size(); i++) { - V2HorizontalPodAutoscaler.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject()); + V2HorizontalPodAutoscaler.validateJsonElement(jsonArrayitems.get(i)); }; if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); } // validate the optional field `metadata` if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - V1ListMeta.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + V1ListMeta.validateJsonElement(jsonObj.get("metadata")); } } @@ -296,9 +289,9 @@ public void write(JsonWriter out, V2HorizontalPodAutoscalerList value) throws IO @Override public V2HorizontalPodAutoscalerList read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -325,3 +318,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerSpec.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerSpec.java index e47eeeb547..94b9f25624 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerSpec.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerSpec.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -24,6 +24,7 @@ import io.kubernetes.client.openapi.models.V2MetricSpec; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -46,7 +47,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -54,7 +54,7 @@ /** * HorizontalPodAutoscalerSpec describes the desired functionality of the HorizontalPodAutoscaler. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V2HorizontalPodAutoscalerSpec { public static final String SERIALIZED_NAME_BEHAVIOR = "behavior"; @SerializedName(SERIALIZED_NAME_BEHAVIOR) @@ -66,7 +66,7 @@ public class V2HorizontalPodAutoscalerSpec { public static final String SERIALIZED_NAME_METRICS = "metrics"; @SerializedName(SERIALIZED_NAME_METRICS) - private List metrics; + private List metrics = new ArrayList<>(); public static final String SERIALIZED_NAME_MIN_REPLICAS = "minReplicas"; @SerializedName(SERIALIZED_NAME_MIN_REPLICAS) @@ -80,7 +80,6 @@ public V2HorizontalPodAutoscalerSpec() { } public V2HorizontalPodAutoscalerSpec behavior(V2HorizontalPodAutoscalerBehavior behavior) { - this.behavior = behavior; return this; } @@ -94,14 +93,12 @@ public V2HorizontalPodAutoscalerBehavior getBehavior() { return behavior; } - public void setBehavior(V2HorizontalPodAutoscalerBehavior behavior) { this.behavior = behavior; } public V2HorizontalPodAutoscalerSpec maxReplicas(Integer maxReplicas) { - this.maxReplicas = maxReplicas; return this; } @@ -115,14 +112,12 @@ public Integer getMaxReplicas() { return maxReplicas; } - public void setMaxReplicas(Integer maxReplicas) { this.maxReplicas = maxReplicas; } public V2HorizontalPodAutoscalerSpec metrics(List metrics) { - this.metrics = metrics; return this; } @@ -144,14 +139,12 @@ public List getMetrics() { return metrics; } - public void setMetrics(List metrics) { this.metrics = metrics; } public V2HorizontalPodAutoscalerSpec minReplicas(Integer minReplicas) { - this.minReplicas = minReplicas; return this; } @@ -165,14 +158,12 @@ public Integer getMinReplicas() { return minReplicas; } - public void setMinReplicas(Integer minReplicas) { this.minReplicas = minReplicas; } public V2HorizontalPodAutoscalerSpec scaleTargetRef(V2CrossVersionObjectReference scaleTargetRef) { - this.scaleTargetRef = scaleTargetRef; return this; } @@ -186,7 +177,6 @@ public V2CrossVersionObjectReference getScaleTargetRef() { return scaleTargetRef; } - public void setScaleTargetRef(V2CrossVersionObjectReference scaleTargetRef) { this.scaleTargetRef = scaleTargetRef; } @@ -258,35 +248,36 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V2HorizontalPodAutoscalerSpec + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V2HorizontalPodAutoscalerSpec */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V2HorizontalPodAutoscalerSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V2HorizontalPodAutoscalerSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V2HorizontalPodAutoscalerSpec is not found in the empty JSON string", V2HorizontalPodAutoscalerSpec.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V2HorizontalPodAutoscalerSpec.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V2HorizontalPodAutoscalerSpec` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V2HorizontalPodAutoscalerSpec` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V2HorizontalPodAutoscalerSpec.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `behavior` if (jsonObj.get("behavior") != null && !jsonObj.get("behavior").isJsonNull()) { - V2HorizontalPodAutoscalerBehavior.validateJsonObject(jsonObj.getAsJsonObject("behavior")); + V2HorizontalPodAutoscalerBehavior.validateJsonElement(jsonObj.get("behavior")); } if (jsonObj.get("metrics") != null && !jsonObj.get("metrics").isJsonNull()) { JsonArray jsonArraymetrics = jsonObj.getAsJsonArray("metrics"); @@ -298,12 +289,12 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `metrics` (array) for (int i = 0; i < jsonArraymetrics.size(); i++) { - V2MetricSpec.validateJsonObject(jsonArraymetrics.get(i).getAsJsonObject()); + V2MetricSpec.validateJsonElement(jsonArraymetrics.get(i)); }; } } // validate the required field `scaleTargetRef` - V2CrossVersionObjectReference.validateJsonObject(jsonObj.getAsJsonObject("scaleTargetRef")); + V2CrossVersionObjectReference.validateJsonElement(jsonObj.get("scaleTargetRef")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -326,9 +317,9 @@ public void write(JsonWriter out, V2HorizontalPodAutoscalerSpec value) throws IO @Override public V2HorizontalPodAutoscalerSpec read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -355,3 +346,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerStatus.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerStatus.java index 1e566fb7cd..606baca04e 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerStatus.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerStatus.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -24,6 +24,7 @@ import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -46,7 +47,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -54,15 +54,15 @@ /** * HorizontalPodAutoscalerStatus describes the current status of a horizontal pod autoscaler. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V2HorizontalPodAutoscalerStatus { public static final String SERIALIZED_NAME_CONDITIONS = "conditions"; @SerializedName(SERIALIZED_NAME_CONDITIONS) - private List conditions; + private List conditions = new ArrayList<>(); public static final String SERIALIZED_NAME_CURRENT_METRICS = "currentMetrics"; @SerializedName(SERIALIZED_NAME_CURRENT_METRICS) - private List currentMetrics; + private List currentMetrics = new ArrayList<>(); public static final String SERIALIZED_NAME_CURRENT_REPLICAS = "currentReplicas"; @SerializedName(SERIALIZED_NAME_CURRENT_REPLICAS) @@ -84,7 +84,6 @@ public V2HorizontalPodAutoscalerStatus() { } public V2HorizontalPodAutoscalerStatus conditions(List conditions) { - this.conditions = conditions; return this; } @@ -106,14 +105,12 @@ public List getConditions() { return conditions; } - public void setConditions(List conditions) { this.conditions = conditions; } public V2HorizontalPodAutoscalerStatus currentMetrics(List currentMetrics) { - this.currentMetrics = currentMetrics; return this; } @@ -135,14 +132,12 @@ public List getCurrentMetrics() { return currentMetrics; } - public void setCurrentMetrics(List currentMetrics) { this.currentMetrics = currentMetrics; } public V2HorizontalPodAutoscalerStatus currentReplicas(Integer currentReplicas) { - this.currentReplicas = currentReplicas; return this; } @@ -156,14 +151,12 @@ public Integer getCurrentReplicas() { return currentReplicas; } - public void setCurrentReplicas(Integer currentReplicas) { this.currentReplicas = currentReplicas; } public V2HorizontalPodAutoscalerStatus desiredReplicas(Integer desiredReplicas) { - this.desiredReplicas = desiredReplicas; return this; } @@ -177,14 +170,12 @@ public Integer getDesiredReplicas() { return desiredReplicas; } - public void setDesiredReplicas(Integer desiredReplicas) { this.desiredReplicas = desiredReplicas; } public V2HorizontalPodAutoscalerStatus lastScaleTime(OffsetDateTime lastScaleTime) { - this.lastScaleTime = lastScaleTime; return this; } @@ -198,14 +189,12 @@ public OffsetDateTime getLastScaleTime() { return lastScaleTime; } - public void setLastScaleTime(OffsetDateTime lastScaleTime) { this.lastScaleTime = lastScaleTime; } public V2HorizontalPodAutoscalerStatus observedGeneration(Long observedGeneration) { - this.observedGeneration = observedGeneration; return this; } @@ -219,7 +208,6 @@ public Long getObservedGeneration() { return observedGeneration; } - public void setObservedGeneration(Long observedGeneration) { this.observedGeneration = observedGeneration; } @@ -293,32 +281,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V2HorizontalPodAutoscalerStatus + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V2HorizontalPodAutoscalerStatus */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V2HorizontalPodAutoscalerStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V2HorizontalPodAutoscalerStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V2HorizontalPodAutoscalerStatus is not found in the empty JSON string", V2HorizontalPodAutoscalerStatus.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V2HorizontalPodAutoscalerStatus.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V2HorizontalPodAutoscalerStatus` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V2HorizontalPodAutoscalerStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V2HorizontalPodAutoscalerStatus.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (jsonObj.get("conditions") != null && !jsonObj.get("conditions").isJsonNull()) { JsonArray jsonArrayconditions = jsonObj.getAsJsonArray("conditions"); if (jsonArrayconditions != null) { @@ -329,7 +318,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `conditions` (array) for (int i = 0; i < jsonArrayconditions.size(); i++) { - V2HorizontalPodAutoscalerCondition.validateJsonObject(jsonArrayconditions.get(i).getAsJsonObject()); + V2HorizontalPodAutoscalerCondition.validateJsonElement(jsonArrayconditions.get(i)); }; } } @@ -343,7 +332,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `currentMetrics` (array) for (int i = 0; i < jsonArraycurrentMetrics.size(); i++) { - V2MetricStatus.validateJsonObject(jsonArraycurrentMetrics.get(i).getAsJsonObject()); + V2MetricStatus.validateJsonElement(jsonArraycurrentMetrics.get(i)); }; } } @@ -369,9 +358,9 @@ public void write(JsonWriter out, V2HorizontalPodAutoscalerStatus value) throws @Override public V2HorizontalPodAutoscalerStatus read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -398,3 +387,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2MetricIdentifier.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2MetricIdentifier.java index 0f69fe47b7..648014e48c 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2MetricIdentifier.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2MetricIdentifier.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.openapi.models.V1LabelSelector; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * MetricIdentifier defines the name and optionally selector for a metric */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V2MetricIdentifier { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) @@ -64,7 +64,6 @@ public V2MetricIdentifier() { } public V2MetricIdentifier name(String name) { - this.name = name; return this; } @@ -78,14 +77,12 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } public V2MetricIdentifier selector(V1LabelSelector selector) { - this.selector = selector; return this; } @@ -99,7 +96,6 @@ public V1LabelSelector getSelector() { return selector; } - public void setSelector(V1LabelSelector selector) { this.selector = selector; } @@ -161,38 +157,39 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V2MetricIdentifier + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V2MetricIdentifier */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V2MetricIdentifier.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V2MetricIdentifier.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V2MetricIdentifier is not found in the empty JSON string", V2MetricIdentifier.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V2MetricIdentifier.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V2MetricIdentifier` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V2MetricIdentifier` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V2MetricIdentifier.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } // validate the optional field `selector` if (jsonObj.get("selector") != null && !jsonObj.get("selector").isJsonNull()) { - V1LabelSelector.validateJsonObject(jsonObj.getAsJsonObject("selector")); + V1LabelSelector.validateJsonElement(jsonObj.get("selector")); } } @@ -216,9 +213,9 @@ public void write(JsonWriter out, V2MetricIdentifier value) throws IOException { @Override public V2MetricIdentifier read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -245,3 +242,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2MetricSpec.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2MetricSpec.java index 972a00601a..aebac48b6b 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2MetricSpec.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2MetricSpec.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -25,6 +25,7 @@ import io.kubernetes.client.openapi.models.V2PodsMetricSource; import io.kubernetes.client.openapi.models.V2ResourceMetricSource; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -46,7 +47,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -54,7 +54,7 @@ /** * MetricSpec specifies how to scale based on a single metric (only `type` and one other matching field should be set at once). */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V2MetricSpec { public static final String SERIALIZED_NAME_CONTAINER_RESOURCE = "containerResource"; @SerializedName(SERIALIZED_NAME_CONTAINER_RESOURCE) @@ -84,7 +84,6 @@ public V2MetricSpec() { } public V2MetricSpec containerResource(V2ContainerResourceMetricSource containerResource) { - this.containerResource = containerResource; return this; } @@ -98,14 +97,12 @@ public V2ContainerResourceMetricSource getContainerResource() { return containerResource; } - public void setContainerResource(V2ContainerResourceMetricSource containerResource) { this.containerResource = containerResource; } public V2MetricSpec external(V2ExternalMetricSource external) { - this.external = external; return this; } @@ -119,14 +116,12 @@ public V2ExternalMetricSource getExternal() { return external; } - public void setExternal(V2ExternalMetricSource external) { this.external = external; } public V2MetricSpec _object(V2ObjectMetricSource _object) { - this._object = _object; return this; } @@ -140,14 +135,12 @@ public V2ObjectMetricSource getObject() { return _object; } - public void setObject(V2ObjectMetricSource _object) { this._object = _object; } public V2MetricSpec pods(V2PodsMetricSource pods) { - this.pods = pods; return this; } @@ -161,14 +154,12 @@ public V2PodsMetricSource getPods() { return pods; } - public void setPods(V2PodsMetricSource pods) { this.pods = pods; } public V2MetricSpec resource(V2ResourceMetricSource resource) { - this.resource = resource; return this; } @@ -182,14 +173,12 @@ public V2ResourceMetricSource getResource() { return resource; } - public void setResource(V2ResourceMetricSource resource) { this.resource = resource; } public V2MetricSpec type(String type) { - this.type = type; return this; } @@ -203,7 +192,6 @@ public String getType() { return type; } - public void setType(String type) { this.type = type; } @@ -277,51 +265,52 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V2MetricSpec + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V2MetricSpec */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V2MetricSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V2MetricSpec.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V2MetricSpec is not found in the empty JSON string", V2MetricSpec.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V2MetricSpec.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V2MetricSpec` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V2MetricSpec` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V2MetricSpec.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `containerResource` if (jsonObj.get("containerResource") != null && !jsonObj.get("containerResource").isJsonNull()) { - V2ContainerResourceMetricSource.validateJsonObject(jsonObj.getAsJsonObject("containerResource")); + V2ContainerResourceMetricSource.validateJsonElement(jsonObj.get("containerResource")); } // validate the optional field `external` if (jsonObj.get("external") != null && !jsonObj.get("external").isJsonNull()) { - V2ExternalMetricSource.validateJsonObject(jsonObj.getAsJsonObject("external")); + V2ExternalMetricSource.validateJsonElement(jsonObj.get("external")); } // validate the optional field `object` if (jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) { - V2ObjectMetricSource.validateJsonObject(jsonObj.getAsJsonObject("object")); + V2ObjectMetricSource.validateJsonElement(jsonObj.get("object")); } // validate the optional field `pods` if (jsonObj.get("pods") != null && !jsonObj.get("pods").isJsonNull()) { - V2PodsMetricSource.validateJsonObject(jsonObj.getAsJsonObject("pods")); + V2PodsMetricSource.validateJsonElement(jsonObj.get("pods")); } // validate the optional field `resource` if (jsonObj.get("resource") != null && !jsonObj.get("resource").isJsonNull()) { - V2ResourceMetricSource.validateJsonObject(jsonObj.getAsJsonObject("resource")); + V2ResourceMetricSource.validateJsonElement(jsonObj.get("resource")); } if (!jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); @@ -348,9 +337,9 @@ public void write(JsonWriter out, V2MetricSpec value) throws IOException { @Override public V2MetricSpec read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -377,3 +366,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2MetricStatus.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2MetricStatus.java index 1496753a98..23a0348f78 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2MetricStatus.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2MetricStatus.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -25,6 +25,7 @@ import io.kubernetes.client.openapi.models.V2PodsMetricStatus; import io.kubernetes.client.openapi.models.V2ResourceMetricStatus; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -46,7 +47,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -54,7 +54,7 @@ /** * MetricStatus describes the last-read state of a single metric. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V2MetricStatus { public static final String SERIALIZED_NAME_CONTAINER_RESOURCE = "containerResource"; @SerializedName(SERIALIZED_NAME_CONTAINER_RESOURCE) @@ -84,7 +84,6 @@ public V2MetricStatus() { } public V2MetricStatus containerResource(V2ContainerResourceMetricStatus containerResource) { - this.containerResource = containerResource; return this; } @@ -98,14 +97,12 @@ public V2ContainerResourceMetricStatus getContainerResource() { return containerResource; } - public void setContainerResource(V2ContainerResourceMetricStatus containerResource) { this.containerResource = containerResource; } public V2MetricStatus external(V2ExternalMetricStatus external) { - this.external = external; return this; } @@ -119,14 +116,12 @@ public V2ExternalMetricStatus getExternal() { return external; } - public void setExternal(V2ExternalMetricStatus external) { this.external = external; } public V2MetricStatus _object(V2ObjectMetricStatus _object) { - this._object = _object; return this; } @@ -140,14 +135,12 @@ public V2ObjectMetricStatus getObject() { return _object; } - public void setObject(V2ObjectMetricStatus _object) { this._object = _object; } public V2MetricStatus pods(V2PodsMetricStatus pods) { - this.pods = pods; return this; } @@ -161,14 +154,12 @@ public V2PodsMetricStatus getPods() { return pods; } - public void setPods(V2PodsMetricStatus pods) { this.pods = pods; } public V2MetricStatus resource(V2ResourceMetricStatus resource) { - this.resource = resource; return this; } @@ -182,14 +173,12 @@ public V2ResourceMetricStatus getResource() { return resource; } - public void setResource(V2ResourceMetricStatus resource) { this.resource = resource; } public V2MetricStatus type(String type) { - this.type = type; return this; } @@ -203,7 +192,6 @@ public String getType() { return type; } - public void setType(String type) { this.type = type; } @@ -277,51 +265,52 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V2MetricStatus + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V2MetricStatus */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V2MetricStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V2MetricStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V2MetricStatus is not found in the empty JSON string", V2MetricStatus.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V2MetricStatus.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V2MetricStatus` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V2MetricStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V2MetricStatus.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `containerResource` if (jsonObj.get("containerResource") != null && !jsonObj.get("containerResource").isJsonNull()) { - V2ContainerResourceMetricStatus.validateJsonObject(jsonObj.getAsJsonObject("containerResource")); + V2ContainerResourceMetricStatus.validateJsonElement(jsonObj.get("containerResource")); } // validate the optional field `external` if (jsonObj.get("external") != null && !jsonObj.get("external").isJsonNull()) { - V2ExternalMetricStatus.validateJsonObject(jsonObj.getAsJsonObject("external")); + V2ExternalMetricStatus.validateJsonElement(jsonObj.get("external")); } // validate the optional field `object` if (jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) { - V2ObjectMetricStatus.validateJsonObject(jsonObj.getAsJsonObject("object")); + V2ObjectMetricStatus.validateJsonElement(jsonObj.get("object")); } // validate the optional field `pods` if (jsonObj.get("pods") != null && !jsonObj.get("pods").isJsonNull()) { - V2PodsMetricStatus.validateJsonObject(jsonObj.getAsJsonObject("pods")); + V2PodsMetricStatus.validateJsonElement(jsonObj.get("pods")); } // validate the optional field `resource` if (jsonObj.get("resource") != null && !jsonObj.get("resource").isJsonNull()) { - V2ResourceMetricStatus.validateJsonObject(jsonObj.getAsJsonObject("resource")); + V2ResourceMetricStatus.validateJsonElement(jsonObj.get("resource")); } if (!jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); @@ -348,9 +337,9 @@ public void write(JsonWriter out, V2MetricStatus value) throws IOException { @Override public V2MetricStatus read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -377,3 +366,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2MetricTarget.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2MetricTarget.java index 096d89451a..22856d8c0c 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2MetricTarget.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2MetricTarget.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.custom.Quantity; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * MetricTarget defines the target value, average value, or average utilization of a specific metric */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V2MetricTarget { public static final String SERIALIZED_NAME_AVERAGE_UTILIZATION = "averageUtilization"; @SerializedName(SERIALIZED_NAME_AVERAGE_UTILIZATION) @@ -72,7 +72,6 @@ public V2MetricTarget() { } public V2MetricTarget averageUtilization(Integer averageUtilization) { - this.averageUtilization = averageUtilization; return this; } @@ -86,14 +85,12 @@ public Integer getAverageUtilization() { return averageUtilization; } - public void setAverageUtilization(Integer averageUtilization) { this.averageUtilization = averageUtilization; } public V2MetricTarget averageValue(Quantity averageValue) { - this.averageValue = averageValue; return this; } @@ -107,14 +104,12 @@ public Quantity getAverageValue() { return averageValue; } - public void setAverageValue(Quantity averageValue) { this.averageValue = averageValue; } public V2MetricTarget type(String type) { - this.type = type; return this; } @@ -128,14 +123,12 @@ public String getType() { return type; } - public void setType(String type) { this.type = type; } public V2MetricTarget value(Quantity value) { - this.value = value; return this; } @@ -149,7 +142,6 @@ public Quantity getValue() { return value; } - public void setValue(Quantity value) { this.value = value; } @@ -217,32 +209,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V2MetricTarget + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V2MetricTarget */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V2MetricTarget.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V2MetricTarget.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V2MetricTarget is not found in the empty JSON string", V2MetricTarget.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V2MetricTarget.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V2MetricTarget` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V2MetricTarget` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V2MetricTarget.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("averageValue") != null && !jsonObj.get("averageValue").isJsonNull()) && !jsonObj.get("averageValue").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `averageValue` to be a primitive type in the JSON string but got `%s`", jsonObj.get("averageValue").toString())); } @@ -274,9 +267,9 @@ public void write(JsonWriter out, V2MetricTarget value) throws IOException { @Override public V2MetricTarget read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -303,3 +296,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2MetricValueStatus.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2MetricValueStatus.java index abb6c048e8..d1e93b5cbf 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2MetricValueStatus.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2MetricValueStatus.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.custom.Quantity; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * MetricValueStatus holds the current value for a metric */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V2MetricValueStatus { public static final String SERIALIZED_NAME_AVERAGE_UTILIZATION = "averageUtilization"; @SerializedName(SERIALIZED_NAME_AVERAGE_UTILIZATION) @@ -68,7 +68,6 @@ public V2MetricValueStatus() { } public V2MetricValueStatus averageUtilization(Integer averageUtilization) { - this.averageUtilization = averageUtilization; return this; } @@ -82,14 +81,12 @@ public Integer getAverageUtilization() { return averageUtilization; } - public void setAverageUtilization(Integer averageUtilization) { this.averageUtilization = averageUtilization; } public V2MetricValueStatus averageValue(Quantity averageValue) { - this.averageValue = averageValue; return this; } @@ -103,14 +100,12 @@ public Quantity getAverageValue() { return averageValue; } - public void setAverageValue(Quantity averageValue) { this.averageValue = averageValue; } public V2MetricValueStatus value(Quantity value) { - this.value = value; return this; } @@ -124,7 +119,6 @@ public Quantity getValue() { return value; } - public void setValue(Quantity value) { this.value = value; } @@ -188,25 +182,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V2MetricValueStatus + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V2MetricValueStatus */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V2MetricValueStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V2MetricValueStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V2MetricValueStatus is not found in the empty JSON string", V2MetricValueStatus.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V2MetricValueStatus.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V2MetricValueStatus` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V2MetricValueStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("averageValue") != null && !jsonObj.get("averageValue").isJsonNull()) && !jsonObj.get("averageValue").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `averageValue` to be a primitive type in the JSON string but got `%s`", jsonObj.get("averageValue").toString())); } @@ -235,9 +230,9 @@ public void write(JsonWriter out, V2MetricValueStatus value) throws IOException @Override public V2MetricValueStatus read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -264,3 +259,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2ObjectMetricSource.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2ObjectMetricSource.java index 037f14824c..73f0d041c4 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2ObjectMetricSource.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2ObjectMetricSource.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V2MetricIdentifier; import io.kubernetes.client.openapi.models.V2MetricTarget; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * ObjectMetricSource indicates how to scale on a metric describing a kubernetes object (for example, hits-per-second on an Ingress object). */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V2ObjectMetricSource { public static final String SERIALIZED_NAME_DESCRIBED_OBJECT = "describedObject"; @SerializedName(SERIALIZED_NAME_DESCRIBED_OBJECT) @@ -70,7 +70,6 @@ public V2ObjectMetricSource() { } public V2ObjectMetricSource describedObject(V2CrossVersionObjectReference describedObject) { - this.describedObject = describedObject; return this; } @@ -84,14 +83,12 @@ public V2CrossVersionObjectReference getDescribedObject() { return describedObject; } - public void setDescribedObject(V2CrossVersionObjectReference describedObject) { this.describedObject = describedObject; } public V2ObjectMetricSource metric(V2MetricIdentifier metric) { - this.metric = metric; return this; } @@ -105,14 +102,12 @@ public V2MetricIdentifier getMetric() { return metric; } - public void setMetric(V2MetricIdentifier metric) { this.metric = metric; } public V2ObjectMetricSource target(V2MetricTarget target) { - this.target = target; return this; } @@ -126,7 +121,6 @@ public V2MetricTarget getTarget() { return target; } - public void setTarget(V2MetricTarget target) { this.target = target; } @@ -193,38 +187,39 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V2ObjectMetricSource + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V2ObjectMetricSource */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V2ObjectMetricSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V2ObjectMetricSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V2ObjectMetricSource is not found in the empty JSON string", V2ObjectMetricSource.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V2ObjectMetricSource.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V2ObjectMetricSource` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V2ObjectMetricSource` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V2ObjectMetricSource.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the required field `describedObject` - V2CrossVersionObjectReference.validateJsonObject(jsonObj.getAsJsonObject("describedObject")); + V2CrossVersionObjectReference.validateJsonElement(jsonObj.get("describedObject")); // validate the required field `metric` - V2MetricIdentifier.validateJsonObject(jsonObj.getAsJsonObject("metric")); + V2MetricIdentifier.validateJsonElement(jsonObj.get("metric")); // validate the required field `target` - V2MetricTarget.validateJsonObject(jsonObj.getAsJsonObject("target")); + V2MetricTarget.validateJsonElement(jsonObj.get("target")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -247,9 +242,9 @@ public void write(JsonWriter out, V2ObjectMetricSource value) throws IOException @Override public V2ObjectMetricSource read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -276,3 +271,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2ObjectMetricStatus.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2ObjectMetricStatus.java index b516fb9a51..8f9ccf92ba 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2ObjectMetricStatus.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2ObjectMetricStatus.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,6 +23,7 @@ import io.kubernetes.client.openapi.models.V2MetricIdentifier; import io.kubernetes.client.openapi.models.V2MetricValueStatus; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -44,7 +45,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -52,7 +52,7 @@ /** * ObjectMetricStatus indicates the current value of a metric describing a kubernetes object (for example, hits-per-second on an Ingress object). */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V2ObjectMetricStatus { public static final String SERIALIZED_NAME_CURRENT = "current"; @SerializedName(SERIALIZED_NAME_CURRENT) @@ -70,7 +70,6 @@ public V2ObjectMetricStatus() { } public V2ObjectMetricStatus current(V2MetricValueStatus current) { - this.current = current; return this; } @@ -84,14 +83,12 @@ public V2MetricValueStatus getCurrent() { return current; } - public void setCurrent(V2MetricValueStatus current) { this.current = current; } public V2ObjectMetricStatus describedObject(V2CrossVersionObjectReference describedObject) { - this.describedObject = describedObject; return this; } @@ -105,14 +102,12 @@ public V2CrossVersionObjectReference getDescribedObject() { return describedObject; } - public void setDescribedObject(V2CrossVersionObjectReference describedObject) { this.describedObject = describedObject; } public V2ObjectMetricStatus metric(V2MetricIdentifier metric) { - this.metric = metric; return this; } @@ -126,7 +121,6 @@ public V2MetricIdentifier getMetric() { return metric; } - public void setMetric(V2MetricIdentifier metric) { this.metric = metric; } @@ -193,38 +187,39 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V2ObjectMetricStatus + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V2ObjectMetricStatus */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V2ObjectMetricStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V2ObjectMetricStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V2ObjectMetricStatus is not found in the empty JSON string", V2ObjectMetricStatus.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V2ObjectMetricStatus.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V2ObjectMetricStatus` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V2ObjectMetricStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V2ObjectMetricStatus.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the required field `current` - V2MetricValueStatus.validateJsonObject(jsonObj.getAsJsonObject("current")); + V2MetricValueStatus.validateJsonElement(jsonObj.get("current")); // validate the required field `describedObject` - V2CrossVersionObjectReference.validateJsonObject(jsonObj.getAsJsonObject("describedObject")); + V2CrossVersionObjectReference.validateJsonElement(jsonObj.get("describedObject")); // validate the required field `metric` - V2MetricIdentifier.validateJsonObject(jsonObj.getAsJsonObject("metric")); + V2MetricIdentifier.validateJsonElement(jsonObj.get("metric")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -247,9 +242,9 @@ public void write(JsonWriter out, V2ObjectMetricStatus value) throws IOException @Override public V2ObjectMetricStatus read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -276,3 +271,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2PodsMetricSource.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2PodsMetricSource.java index fe0b45b227..ecc48a3d54 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2PodsMetricSource.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2PodsMetricSource.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V2MetricIdentifier; import io.kubernetes.client.openapi.models.V2MetricTarget; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -43,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -51,7 +51,7 @@ /** * 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. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V2PodsMetricSource { public static final String SERIALIZED_NAME_METRIC = "metric"; @SerializedName(SERIALIZED_NAME_METRIC) @@ -65,7 +65,6 @@ public V2PodsMetricSource() { } public V2PodsMetricSource metric(V2MetricIdentifier metric) { - this.metric = metric; return this; } @@ -79,14 +78,12 @@ public V2MetricIdentifier getMetric() { return metric; } - public void setMetric(V2MetricIdentifier metric) { this.metric = metric; } public V2PodsMetricSource target(V2MetricTarget target) { - this.target = target; return this; } @@ -100,7 +97,6 @@ public V2MetricTarget getTarget() { return target; } - public void setTarget(V2MetricTarget target) { this.target = target; } @@ -163,36 +159,37 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V2PodsMetricSource + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V2PodsMetricSource */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V2PodsMetricSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V2PodsMetricSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V2PodsMetricSource is not found in the empty JSON string", V2PodsMetricSource.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V2PodsMetricSource.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V2PodsMetricSource` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V2PodsMetricSource` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V2PodsMetricSource.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the required field `metric` - V2MetricIdentifier.validateJsonObject(jsonObj.getAsJsonObject("metric")); + V2MetricIdentifier.validateJsonElement(jsonObj.get("metric")); // validate the required field `target` - V2MetricTarget.validateJsonObject(jsonObj.getAsJsonObject("target")); + V2MetricTarget.validateJsonElement(jsonObj.get("target")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -215,9 +212,9 @@ public void write(JsonWriter out, V2PodsMetricSource value) throws IOException { @Override public V2PodsMetricSource read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -244,3 +241,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2PodsMetricStatus.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2PodsMetricStatus.java index 1d6fa9ae84..ee1d9acabd 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2PodsMetricStatus.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2PodsMetricStatus.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +22,7 @@ import io.kubernetes.client.openapi.models.V2MetricIdentifier; import io.kubernetes.client.openapi.models.V2MetricValueStatus; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -43,7 +44,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -51,7 +51,7 @@ /** * PodsMetricStatus indicates the current value of a metric describing each pod in the current scale target (for example, transactions-processed-per-second). */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V2PodsMetricStatus { public static final String SERIALIZED_NAME_CURRENT = "current"; @SerializedName(SERIALIZED_NAME_CURRENT) @@ -65,7 +65,6 @@ public V2PodsMetricStatus() { } public V2PodsMetricStatus current(V2MetricValueStatus current) { - this.current = current; return this; } @@ -79,14 +78,12 @@ public V2MetricValueStatus getCurrent() { return current; } - public void setCurrent(V2MetricValueStatus current) { this.current = current; } public V2PodsMetricStatus metric(V2MetricIdentifier metric) { - this.metric = metric; return this; } @@ -100,7 +97,6 @@ public V2MetricIdentifier getMetric() { return metric; } - public void setMetric(V2MetricIdentifier metric) { this.metric = metric; } @@ -163,36 +159,37 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V2PodsMetricStatus + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V2PodsMetricStatus */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V2PodsMetricStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V2PodsMetricStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V2PodsMetricStatus is not found in the empty JSON string", V2PodsMetricStatus.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V2PodsMetricStatus.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V2PodsMetricStatus` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V2PodsMetricStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V2PodsMetricStatus.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the required field `current` - V2MetricValueStatus.validateJsonObject(jsonObj.getAsJsonObject("current")); + V2MetricValueStatus.validateJsonElement(jsonObj.get("current")); // validate the required field `metric` - V2MetricIdentifier.validateJsonObject(jsonObj.getAsJsonObject("metric")); + V2MetricIdentifier.validateJsonElement(jsonObj.get("metric")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -215,9 +212,9 @@ public void write(JsonWriter out, V2PodsMetricStatus value) throws IOException { @Override public V2PodsMetricStatus read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -244,3 +241,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2ResourceMetricSource.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2ResourceMetricSource.java index ca479cebb4..9ae66ddb54 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2ResourceMetricSource.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2ResourceMetricSource.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.openapi.models.V2MetricTarget; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * 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. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V2ResourceMetricSource { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) @@ -64,7 +64,6 @@ public V2ResourceMetricSource() { } public V2ResourceMetricSource name(String name) { - this.name = name; return this; } @@ -78,14 +77,12 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } public V2ResourceMetricSource target(V2MetricTarget target) { - this.target = target; return this; } @@ -99,7 +96,6 @@ public V2MetricTarget getTarget() { return target; } - public void setTarget(V2MetricTarget target) { this.target = target; } @@ -162,37 +158,38 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V2ResourceMetricSource + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V2ResourceMetricSource */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V2ResourceMetricSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V2ResourceMetricSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V2ResourceMetricSource is not found in the empty JSON string", V2ResourceMetricSource.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V2ResourceMetricSource.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V2ResourceMetricSource` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V2ResourceMetricSource` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V2ResourceMetricSource.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } // validate the required field `target` - V2MetricTarget.validateJsonObject(jsonObj.getAsJsonObject("target")); + V2MetricTarget.validateJsonElement(jsonObj.get("target")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -215,9 +212,9 @@ public void write(JsonWriter out, V2ResourceMetricSource value) throws IOExcepti @Override public V2ResourceMetricSource read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -244,3 +241,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2ResourceMetricStatus.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2ResourceMetricStatus.java index 675a42dd76..0c49058f03 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2ResourceMetricStatus.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2ResourceMetricStatus.java @@ -1,19 +1,19 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import io.kubernetes.client.openapi.models.V2MetricValueStatus; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,7 +43,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -50,7 +50,7 @@ /** * 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. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class V2ResourceMetricStatus { public static final String SERIALIZED_NAME_CURRENT = "current"; @SerializedName(SERIALIZED_NAME_CURRENT) @@ -64,7 +64,6 @@ public V2ResourceMetricStatus() { } public V2ResourceMetricStatus current(V2MetricValueStatus current) { - this.current = current; return this; } @@ -78,14 +77,12 @@ public V2MetricValueStatus getCurrent() { return current; } - public void setCurrent(V2MetricValueStatus current) { this.current = current; } public V2ResourceMetricStatus name(String name) { - this.name = name; return this; } @@ -99,7 +96,6 @@ public String getName() { return name; } - public void setName(String name) { this.name = name; } @@ -162,34 +158,35 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to V2ResourceMetricStatus + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to V2ResourceMetricStatus */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!V2ResourceMetricStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V2ResourceMetricStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in V2ResourceMetricStatus is not found in the empty JSON string", V2ResourceMetricStatus.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!V2ResourceMetricStatus.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V2ResourceMetricStatus` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `V2ResourceMetricStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : V2ResourceMetricStatus.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the required field `current` - V2MetricValueStatus.validateJsonObject(jsonObj.getAsJsonObject("current")); + V2MetricValueStatus.validateJsonElement(jsonObj.get("current")); if (!jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } @@ -215,9 +212,9 @@ public void write(JsonWriter out, V2ResourceMetricStatus value) throws IOExcepti @Override public V2ResourceMetricStatus read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -244,3 +241,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/VersionInfo.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/VersionInfo.java index e9efb7f17d..a2cb8b8ff5 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/VersionInfo.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/VersionInfo.java @@ -1,25 +1,26 @@ /* -Copyright 2024 The Kubernetes Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: release-1.30 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.kubernetes.client.openapi.models; import java.util.Objects; -import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -41,7 +42,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import io.kubernetes.client.openapi.JSON; @@ -49,7 +49,7 @@ /** * Info contains versioning information. how we'll want to distribute that information. */ -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-23T13:45:09.091597Z[Etc/UTC]") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-09T20:15:56.920539Z[Etc/UTC]", comments = "Generator version: 7.6.0") public class VersionInfo { public static final String SERIALIZED_NAME_BUILD_DATE = "buildDate"; @SerializedName(SERIALIZED_NAME_BUILD_DATE) @@ -91,7 +91,6 @@ public VersionInfo() { } public VersionInfo buildDate(String buildDate) { - this.buildDate = buildDate; return this; } @@ -105,14 +104,12 @@ public String getBuildDate() { return buildDate; } - public void setBuildDate(String buildDate) { this.buildDate = buildDate; } public VersionInfo compiler(String compiler) { - this.compiler = compiler; return this; } @@ -126,14 +123,12 @@ public String getCompiler() { return compiler; } - public void setCompiler(String compiler) { this.compiler = compiler; } public VersionInfo gitCommit(String gitCommit) { - this.gitCommit = gitCommit; return this; } @@ -147,14 +142,12 @@ public String getGitCommit() { return gitCommit; } - public void setGitCommit(String gitCommit) { this.gitCommit = gitCommit; } public VersionInfo gitTreeState(String gitTreeState) { - this.gitTreeState = gitTreeState; return this; } @@ -168,14 +161,12 @@ public String getGitTreeState() { return gitTreeState; } - public void setGitTreeState(String gitTreeState) { this.gitTreeState = gitTreeState; } public VersionInfo gitVersion(String gitVersion) { - this.gitVersion = gitVersion; return this; } @@ -189,14 +180,12 @@ public String getGitVersion() { return gitVersion; } - public void setGitVersion(String gitVersion) { this.gitVersion = gitVersion; } public VersionInfo goVersion(String goVersion) { - this.goVersion = goVersion; return this; } @@ -210,14 +199,12 @@ public String getGoVersion() { return goVersion; } - public void setGoVersion(String goVersion) { this.goVersion = goVersion; } public VersionInfo major(String major) { - this.major = major; return this; } @@ -231,14 +218,12 @@ public String getMajor() { return major; } - public void setMajor(String major) { this.major = major; } public VersionInfo minor(String minor) { - this.minor = minor; return this; } @@ -252,14 +237,12 @@ public String getMinor() { return minor; } - public void setMinor(String minor) { this.minor = minor; } public VersionInfo platform(String platform) { - this.platform = platform; return this; } @@ -273,7 +256,6 @@ public String getPlatform() { return platform; } - public void setPlatform(String platform) { this.platform = platform; } @@ -364,32 +346,33 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Object and throws an exception if issues found + * Validates the JSON Element and throws an exception if issues found * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to VersionInfo + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to VersionInfo */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!VersionInfo.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!VersionInfo.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in VersionInfo is not found in the empty JSON string", VersionInfo.openapiRequiredFields.toString())); } } - Set> entries = jsonObj.entrySet(); + Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields - for (Entry entry : entries) { + for (Map.Entry entry : entries) { if (!VersionInfo.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `VersionInfo` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `VersionInfo` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : VersionInfo.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("buildDate").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `buildDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("buildDate").toString())); } @@ -439,9 +422,9 @@ public void write(JsonWriter out, VersionInfo value) throws IOException { @Override public VersionInfo read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); @@ -468,3 +451,4 @@ public String toJson() { return JSON.getGson().toJson(this); } } + diff --git a/kubernetes/swagger.json b/kubernetes/swagger.json index 957c8140bf..7aea7ddea0 100644 --- a/kubernetes/swagger.json +++ b/kubernetes/swagger.json @@ -509,6 +509,9 @@ "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" } }, + "required": [ + "items" + ], "type": "object", "x-kubernetes-group-version-kind": [ { @@ -570,6 +573,9 @@ "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" } }, + "required": [ + "items" + ], "type": "object", "x-kubernetes-group-version-kind": [ { @@ -1166,6 +1172,9 @@ "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" } }, + "required": [ + "items" + ], "type": "object", "x-kubernetes-group-version-kind": [ { @@ -1227,6 +1236,9 @@ "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" } }, + "required": [ + "items" + ], "type": "object", "x-kubernetes-group-version-kind": [ { @@ -1651,6 +1663,9 @@ "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" } }, + "required": [ + "items" + ], "type": "object", "x-kubernetes-group-version-kind": [ { @@ -1712,6 +1727,9 @@ "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" } }, + "required": [ + "items" + ], "type": "object", "x-kubernetes-group-version-kind": [ { @@ -6198,7 +6216,7 @@ "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: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", + "description": "Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", "type": "string" }, "optional": { @@ -6216,7 +6234,7 @@ "type": "string" }, "name": { - "description": "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", + "description": "Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", "type": "string" }, "optional": { @@ -6311,7 +6329,7 @@ "x-kubernetes-list-type": "atomic" }, "name": { - "description": "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", + "description": "Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", "type": "string" }, "optional": { @@ -6338,7 +6356,7 @@ "x-kubernetes-list-type": "atomic" }, "name": { - "description": "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", + "description": "Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", "type": "string" }, "optional": { @@ -7675,6 +7693,9 @@ "type": "string" } }, + "required": [ + "ip" + ], "type": "object" }, "v1.HostIP": { @@ -7685,6 +7706,9 @@ "type": "string" } }, + "required": [ + "ip" + ], "type": "object" }, "v1.HostPathVolumeSource": { @@ -8062,7 +8086,7 @@ "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: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", + "description": "Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", "type": "string" } }, @@ -9509,6 +9533,9 @@ "type": "string" } }, + "required": [ + "ip" + ], "type": "object" }, "v1.PodList": { @@ -11018,7 +11045,7 @@ "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: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", + "description": "Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", "type": "string" }, "optional": { @@ -11036,7 +11063,7 @@ "type": "string" }, "name": { - "description": "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", + "description": "Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", "type": "string" }, "optional": { @@ -11100,7 +11127,7 @@ "x-kubernetes-list-type": "atomic" }, "name": { - "description": "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", + "description": "Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", "type": "string" }, "optional": { @@ -11537,7 +11564,7 @@ "description": "sessionAffinityConfig contains the configurations of session affinity." }, "trafficDistribution": { - "description": "TrafficDistribution offers a way to express preferences for how traffic is distributed to Service endpoints. Implementations can use this field as a hint, but are not required to guarantee strict adherence. If the field is not set, the implementation will apply its default routing strategy. If set to \"PreferClose\", implementations should prioritize endpoints that are topologically close (e.g., same zone).", + "description": "TrafficDistribution offers a way to express preferences for how traffic is distributed to Service endpoints. Implementations can use this field as a hint, but are not required to guarantee strict adherence. If the field is not set, the implementation will apply its default routing strategy. If set to \"PreferClose\", implementations should prioritize endpoints that are topologically close (e.g., same zone). This is an alpha field and requires enabling ServiceTrafficDistribution feature.", "type": "string" }, "type": {